summaryrefslogtreecommitdiffstats
path: root/sys/dev/amr
Commit message (Collapse)AuthorAgeFilesLines
* Mega busdma API commit.scottl2003-07-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs
* Merge common XPT_CALC_GEOMETRY functions into a single convenience function.njl2003-06-141-16/+1
| | | | | | | | | | | | | Devices below may experience a change in geometry. * Due to a bug, aic(4) never used extended geometry. Changes all drives >1G to now use extended translation. * sbp(4) drives exactly 1 GB in size now no longer use extended geometry. * umass(4) drives exactly 1 GB in size now no longer use extended geometry. For all other controllers in this commit, this should be a no-op. Looked over by: scottl
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-015-4/+1
| | | | | | | | 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-086-14/+1
| | | | | | | | 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-243-35/+13
| | | | | | Move to new "struct disk *" centered API". OK'ed by: emoore
* Use nullclose(), not noclose().phk2003-02-221-1/+1
|
* Use the standard DISKFLAG_OPEN instead of implementing our own.phk2003-02-222-19/+2
| | | | Use noclose() instead now that our close method is empty.
* Use system noioctl() instead of homerolled.phk2003-02-221-9/+1
|
* NO_GEOM cleanup:phk2003-02-211-1/+1
| | | | | | | | Change the argument to disk_destroy() to be the same struct disk * as disk_create() takes. This enables drivers to ignore the (now) bogus dev_t which disk_create() returns.
* 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-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.
OpenPOWER on IntegriCloud