summaryrefslogtreecommitdiffstats
path: root/sys/dev/amr/amr.c
Commit message (Collapse)AuthorAgeFilesLines
* polled commands can read or write, so bus_dmamap_sync properlyps2005-06-231-2/+16
| | | | | | according to the type of request. Approved by: re
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-291-2/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* handle potential null ptrsam2005-03-311-1/+3
| | | | Noticed by: Coverity Prevent analysis tool
* Fix a null pointer de-ref when passthrough ioctls are issued. Thisscottl2005-03-131-8/+11
| | | | | | involves some code shuffle to avoid locking problems. MFC After: 3 days
* Fix the ioctl path by ensuring that amr_start1() gets called for commandsscottl2005-03-041-18/+22
| | | | | | | | with no associated data. Also revert previous changes that allocate off of the stack instead of using malloc, as it's not needed. Many thanks to LSI for investigating and fixing these problems. Submitted by: rajeshpr @ lsil . com
* Add support for the LSI 320-2E PCI-Express controller. Fix a couple of bugsscottl2005-01-231-5/+9
| | | | | | in the ioctl handler. Update the LSI copyrights for these. Obtained from: LSI, Corp
* Add my copyright for the locking and busdma work.scottl2005-01-231-0/+1
|
* Lock the AMR driver:scottl2005-01-161-99/+94
| | | | | | | | | | - Introduce the amr_io_lock to control access to command queues, bio queues, and the hardware. - Eliminate the taskqueue and do all completion processing in the ithread. - Assign a static slot number to each command instead of doing a linear search for free slots each time a command is needed. - Modify the interrupt handler to more closely match what Linux does, for safety.
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Fix a number of bugs and significantly alter the command execution path toscottl2004-12-051-50/+157
| | | | | | | | | | properly support bounce buffers and resource shortages. This allows the driver to work properly and reliably with more than 4GB of RAM. Of the three data paths that exist in the driver, (block, CAM, ioctl), the ioctl path has not been well tested with these changes due to difficulty with finding an application that uses it that actually works. Sponsored by: The FreeBSD Foundation and FreeBSD Systems, Inc.
* Set up the data flow flag correctly so that bounced buffers have a chance ofscottl2004-09-141-1/+1
| | | | working in amr_enquire().
* Allow i386 binaries to do amr ioctls such as LSI's megamgr on amd64 andambrisko2004-08-161-88/+121
| | | | | | | | ia64. PR: 63155 Submitted by: Mikhail Teterin Tested on: i386, amd64 (via 64bit Xeon system)
* Use a separate flag when doing a kernel coredump when polling forps2004-07-011-3/+3
| | | | completion instead of abusing the interrupt enable flag.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-4/+4
| | | | Bump __FreeBSD_version accordingly.
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Allow amr(4) to get a dynamic major number instead of a static one.scottl2004-02-081-3/+0
| | | | Submitted by: Andre Guibert de Bruet
* crashdump support.ps2003-10-101-12/+55
| | | | Some bits by: Rajesh Prabhakaran <rajeshpr@lsil.com>
* Use __FBSDID().obrien2003-08-241-4/+5
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-011-1/+0
| | | | | | | | Retain the mistake of not updating the devstat API for now. Spell bioq_disksort() consistently with the remaining bioq_*(). #include <geom/geom_disk.h> where this is more appropriate.
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-081-1/+0
| | | | | | | | in geom_disk.c. As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again.
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+5
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* Introduce a new taskqueue that runs completely free of Giant, and inscottl2003-02-261-1/+1
| | | | | | | turns runs its tasks free of Giant too. It is intended that as drivers become locked down, they will move out of the old, Giant-bound taskqueue and into this new one. The old taskqueue has been renamed to taskqueue_swi_giant, and the new one keeps the name taskqueue_swi.
* NO_GEOM cleanup:phk2003-02-241-1/+1
| | | | | | Move to new "struct disk *" centered API". OK'ed by: emoore
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Fix for DELL PERC firmware. Driver was hangingemoore2003-01-091-2/+16
| | | | | | | | | during load time; this attributed to the mailbox busy byte not being set prior to issuing a polling command. Approved by: ps MFC: 7 days
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* Problem: Hang while bootup on Perc2/SC.emoore2002-12-131-2/+4
| | | | | | | | Fix: Error handling wasn't implemented in newly implemented polling code for quartz controllers. Approved by: re@
* (1) Problem: PANIC when loading/unloading driveremoore2002-12-111-7/+72
| | | | | | | | | | | | | | | | | | | | | | as module. This also fix's issue kern/45713. Fix - polling was implemented incorrectly for adapter enquiry and adapter flush. (2) Problem: PANIC when unloading driver as module. Fix - device nodes are not destroyed for amr0, and amrd* when driver is unloaded (3) Problem: PANIC from loading driver when 3ware adapter present, error message "Warning "amrd is usurping twed's bmaj" Fix - put #idef freebsd version < 500000 for bmaj -1 -> amrd_cdevsw (4) Problem: warnings in driver when compiling with DAMR_DEBUG param enabled in Makefile Fix - fix the warnings so driver can compile when -Werror is present in Makefile. Approved by: jhb MFC: 7 days
* Incorrect typecast.emoore2002-10-311-1/+1
|
* amr.c,emoore2002-10-301-14/+103
| | | | | | | | | | | | | | | | | | | amr_cam.c, amrreg.h, amrvar.h: - added support for 12/16 byte cdb's, effecting CAM branch only ( non-disk support ) amrreg.h: - increased number of scatter gather elements from 16 to 26. amr_pci.c: - amr_pci_free(), incorrect bus tag meant for 'amr_mailbox_dmat' was being freed all: - copyright change requested by scottl Reviewed by: ps,scottl MFC after: 1 week
* (1) added LSI Logic copyright, and legal line 3 in license, and stringemoore2002-10-181-34/+40
| | | | | | | | | | | | | | | | | | | | | changes for "LSILogic" (2) enabled non-disk support through CAM interface (3) HA_INQ (a) enabled tagged queuing (b) disable reset during driver loading (b) renamed BSDi string to LSI (4) disabled detecting disk devices during SCSI INQUIRY (5) changed dcdb single element sglist to send one entire buffer chunk (6) nsgelem not set in sglist (7) ap_data_transfer_length not set for dcdb (8) changed "struct thread" to "d_thread_t" for compatibliity { xxx_open, xxx_close, xxx_ioctl } (9) miscellaneous compatiblity fixes (10) bug fix for 0x0409/0x1000 card (11) added compiling amr_cam.c in sys/conf/files (12) added compiling amr_cam.c in sys/modules/amr/Makefile Reviewed by:ps MFC after:1 week 1 week
* Be consistent about "static" functions: if the function is markedphk2002-09-281-5/+5
| | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
* Fixed printf format errors in previous commit. %llu is no more suitablebde2002-03-181-2/+3
| | | | | | | | than %u for printing signed 64-bit types. It fails on different machines, and has the wrong signdness. Fixed old printf format error on the same line. %u is not suitable for printing 32-bit types on all machines.
* Formats that print the block number need to be changed from %u toimp2002-03-181-2/+2
| | | | %llu due to recent changes in bio_pblkno's type.
* Staticise the amr devclass.msmith2002-01-081-2/+2
|
* - Change the taskqueue locking to protect the necessary parts of a taskjhb2001-10-261-4/+0
| | | | | | | | while it is on a queue with the queue lock and remove the per-task locks. - Remove TASK_DESTROY now that it is no longer needed. - Go back to inlining TASK_INIT now that it is short again. Inspired by: dfr
* Add locking to taskqueues. There is one mutex per task, one mutex perjhb2001-10-261-0/+4
| | | | | | | | queue, and a mutex to protect the global list of taskqueues. The only visible change is that a TASK_DESTROY() macro has been added to mirror the TASK_INIT() macro to destroy a task before it is free'd. Submitted by: Andrew Reiter <awr@watson.org>
* KSE Milestone 2julian2001-09-121-3/+3
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* In case the driver runs on an HP NetRaid controller, attempt to properlyhm2001-03-281-3/+37
| | | | | | | | | | | decode the BIOS and firmware version and announce the board as HP NetRaid. This has been tested with a NetRaid 3si controller, the BIOS/firmware printout should also work for other NetRaid controllers but the type detection for other NetRaids (such as the 1si) will not work due to the lack of hardware. Reviewed by: msmith
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Remove some over-msmith2000-11-281-4/+0
|
* MFS:msmith2000-11-281-15/+30
| | | | | | | | | | | | | Fix amr_map_command so that 40LD-specific commands get the scatter-gather list count in the right place. I don't understand why AMI did it like this, but now the AMI MegaManager can talk to the newer (1600 and later) controllers. Remove an unused variable. Include <machine/clock.h> when necessary. Tweak some debugging levels to make things more intelligible.
* Don't test the return value from the actual command when determiningmsmith2000-11-211-5/+0
| | | | | success/failure for submission of the command. The caller will want to deal with this itself.
* Further use of M_ZERO.dwmalone2000-11-181-2/+1
| | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: msmith
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Whoops. The AMR_QUARTZ_GOFASTER option is meant to disable, not enablemsmith2000-09-111-1/+1
| | | | this check. It looks like it doesn't work on at least the 466 controllers.
* Major update to the AMI MegaRAID driver.msmith2000-08-301-865/+824
| | | | | | | | | | | | | | | | - New support for 40LD firmware found in Series 475 and 471 adapters. - Better support for 8LD firmware adapters - Ioctl passthrough interface for userland utilities. - Improved error handling and queueing. - Several bugfixes (including the 'still open' shutdown bug and closing some small race conditions). - Zone-style command allocator, reducing memory wasted under heavy load conditions. - CAM interface (disabled and not fully working) for SCSI passthrough access to non-disk devices Thanks to AMI for supplying a pile of new adapters and various other help in making this happen.
* The AMI MegaRAID's internal memory map conflicts with scatter/gathermsmith2000-06-101-0/+9
| | | | | | | | map physical addresses below 0x2000 (accoding to AMI). If we allocate our s/g tables and get an address below this point, leak the memory and try again. This should fix booting from these controllers.
OpenPOWER on IntegriCloud