summaryrefslogtreecommitdiffstats
path: root/sys/dev/amr
Commit message (Collapse)AuthorAgeFilesLines
* 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-115-11/+95
| | | | | | | | | | | | | | | | | | | | | | 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
* Added support for DELL Perc4/DI.emoore2002-11-211-1/+4
| | | | | | Reviewed by: ps Approved by: jhb MFC after: 5 days
* Incorrect typecast.emoore2002-10-311-1/+1
|
* amr.c,emoore2002-10-309-72/+473
| | | | | | | | | | | | | | | | | | | 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-189-71/+214
| | | | | | | | | | | | | | | | | | | | | 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
* use __packed.alfred2002-09-231-12/+12
|
* (This commit touches about 15 disk device drivers in a very consistentphk2002-09-201-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and predictable way, and I apologize if I have gotten it wrong anywhere, getting prior review on a patch like this is not feasible, considering the number of people involved and hardware availability etc.) If struct disklabel is the messenger: kill the messenger. Inside struct disk we had a struct disklabel which disk drivers used to communicate certain metrics to the disklayer above (GEOM or the disk mini-layer). This commit changes this communication to use four explicit fields instead. Amongst the benefits is that the fields do not get overwritten by wrong or bogus on-disk disklabels. Once that is clear, <sys/disk.h> which is included in the drivers no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in, the few places that needs them, have gotten explicit #includes for them. The disklabel inside struct disk is now only for internal use in the disk mini-layer, so instead of embedding it, we malloc it as we need it. This concludes (modulus any mistakes) the series of disklabel related commits. I belive it all amounts to a NOP for all the rest of you :-) Sponsored by: DARPA & NAI Labs.
* Make FreeBSD "struct disklabel" agnostic, step 311 of 723:phk2002-09-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Rename diskerr() to disk_err() for naming consistency. Drop the by now entirely useless struct disklabel argument. Add a flag argument for new-line termination. Fix a couple of printf-format-casts to %j instead of %l. Correctly print the name of all bio commands. Move the function from subr_disklabel.c to subr_disk.c, and from <sys/disklabel.h> to <sys/disk.h>. Use the new disk_err() throughout, #include <sys/disk.h> as needed. Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs. Remove unused disklabel members of softc for aac, amr and mlx, which seem to originally have been intended for diskerr() use, but which only rotted and got Copy&Pasted at least two times to many. Sponsored by: DARPA & NAI Labs.
* Add IDs for upcoming LSI U320 products that use the MegaRAID interface.gibbs2002-08-301-1/+3
| | | | | Adjust format of one comment so it doesn't wrap at 80 columns. Submitted by: "Moore, Eric Dean" <emoore@lsil.com>
* 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-083-5/+3
|
* Comment tokens after #undef <macroname> and #endif.jhb2001-12-131-1/+1
| | | | Reported by: gcc30
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-3/+3
| | | | also don't use ANSI string concatenation.
* - 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-122-6/+6
| | | | | | | | | | | | | | 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
* Fix warning: 179: warning: label `done' defined but not usedpeter2001-06-151-1/+0
|
* Make the disk mini-layer check for and handle zero-length transfersphk2001-05-061-4/+0
| | | | instead of the underlying drivers.
* Actually biofinish(struct bio *, struct devstat *, int error) is more generalphk2001-05-061-2/+1
| | | | | | than the bioerror(). Most of this patch is generated by scripts.
* 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-262-2/+0
| | | | the bit-bucket.
* Turn on interrupt-entropy harvesting for all/any mass storage devicesmarkm2001-03-011-1/+1
| | | | | | | I could find. I have no doubt missed a couple. Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl.
* Probe generic i960 devices for the old AMI signature as well as the currentmsmith2000-12-222-5/+8
| | | | | | one, in order to support adapters with older firmware. Submitted by: "Prasanth S." <prasanths@ami.co.in>
* Remove some over-msmith2000-11-281-4/+0
|
* MFS:msmith2000-11-282-15/+31
| | | | | | | | | | | | | 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-182-4/+2
| | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: msmith
* Return -10 from the PCI probe to allow room for an updated driver tomsmith2000-10-281-1/+1
| | | | override one built into the kernel.
* Fix typo in the 4.x case.msmith2000-10-271-1/+1
|
* Remove unneeded #include <machine/clock.h>phk2000-10-152-2/+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-309-1132/+2503
| | | | | | | | | | | | | | | | - 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.
* Back out the previous change to the queue(3) interface.jake2000-05-261-3/+3
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-3/+3
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-053-3/+3
| | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
* Disable the returning of "wedged" commands; this is wrong and needs to bemsmith2000-04-241-1/+8
| | | | rethought.
* Remove ~25 unneeded #include <sys/conf.h>phk2000-04-192-2/+0
| | | | Remove ~60 unneeded #include <sys/malloc.h>
* Complete the bio/buf divorce for all code below devfs::strategyphk2000-04-153-35/+35
| | | | | | | | | | Exceptions: Vinum untouched. This means that it cannot be compiled. Greg Lehey is on the case. CCD not converted yet, casts to struct buf (still safe) atapi-cd casts to struct buf to examine B_PHYS
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.phk2000-04-022-3/+3
| | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
* Update to latest working version.msmith2000-04-014-96/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add periodic status monitoring routine. Currently just detects lost commands, further functionality pending data from AMI. Add some new commands states; WEDGED (never coming back) and LATE (for when a command that wasmarked as WEDGED comes bacj, - Remove a number of redundant efforts to poll the card for completed commands. This is what interrupt handlers are for. - Limit the maximum number of outstanding I/O transactions. It seems that some controllers report more than they can really handle, and exceding this limit can cause the controller to lock up. - Don't use 'wait' mode for anything where the controller might not be able to generate interrupts. (Keep the 'wait' mode though sa it will become useful when we start taking userspace commands. - Use a similar atomic locking trategy to the Mylex driver to prevent some reentrancy problems. - Correctly calculate the block count for non-whoile-bloch transfers (actually illegal). - Use the dsik device's si_drv1 field instead of b_driver1 in the buf struct to pass the driver identifier arond. - Rewrite amr_start and amr_done() along the lines of the Mylex driver in order to improve robustnes. - Always force the PCI busmaster bit on.
* Fix detection of the card-ready-for-command state. Use an ultimatemsmith2000-03-232-4/+9
| | | | | | | | | | timeout closer to the 1-second value that AMI use in their Linux driver, and mark the mailbox structures as volatile so that gcc doesn't over-optimise access to them. This should fix the "controller wedged" bug. Submitted by: Brian Dean <brdean@unx.sas.com>
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newphk2000-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful.
* Increase the time we spend waiting for the controller to become ready tomsmith2000-02-171-1/+1
| | | | | | | | | | accept a new command; in high load cases it may be too busy for the old value. This loop needs something to tie it to real time, rather than just the CPU's ability to fetch from the L1 data cache, but this hack works for now. Approved by: jkh
OpenPOWER on IntegriCloud