summaryrefslogtreecommitdiffstats
path: root/sys/dev/amr
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-292-4/+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
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-1/+1
|
* 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
* Remove some unused variables.scottl2005-02-091-2/+0
|
* Remove the messy locking dance around xpt_done()scottl2005-02-091-8/+0
|
* Add support for the LSI 320-2E PCI-Express controller. Fix a couple of bugsscottl2005-01-234-8/+17
| | | | | | 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-165-106/+120
| | | | | | | | | | - 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.
* Free the shared devq last since CAM expects it to be there ifdwhite2005-01-102-5/+11
| | | | | | | xpt_alloc_device() gets called, which can happen during detach in certain situations. Fixes module unload. MFC after: 3 days
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-064-4/+4
|
* Fix a number of bugs and significantly alter the command execution path toscottl2004-12-054-59/+168
| | | | | | | | | | 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-162-88/+134
| | | | | | | | ia64. PR: 63155 Submitted by: Mikhail Teterin Tested on: i386, amd64 (via 64bit Xeon system)
* Add new PCI device ID for PERC4/DI.ambrisko2004-08-141-1/+3
|
* Use a separate flag when doing a kernel coredump when polling forps2004-07-012-3/+4
| | | | completion instead of abusing the interrupt enable flag.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-5/+5
| | | | Bump __FreeBSD_version accordingly.
* Add missing <sys/module.h> includesphk2004-05-302-0/+2
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-2/+3
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Check that amrd_sc is non-NULL before dereferencing it, not after.cperciva2004-02-221-2/+2
| | | | | Reported by: "Ted Unangst" <tedu@coverity.com> Approved by: rwatson (mentor)
* 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.
* Change the disk(9) API in order to make device removal more robust.phk2004-02-182-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | Previously the "struct disk" were owned by the device driver and this gave us problems when the device disappared and the users of that device were not immediately disappearing. Now the struct disk is allocate with a new call, disk_alloc() and owned by geom_disk and just abandonned by the device driver when disk_create() is called. Unfortunately, this results in a ton of "s/\./->/" changes to device drivers. Since I'm doing the sweep anyway, a couple of other API improvements have been carried out at the same time: The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to DISKFLAG_NEEDSGIANT A version number have been added to disk_create() so that we can detect, report and ignore binary drivers with old ABI in the future. Manual page update to follow shortly.
* 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-103-12/+84
| | | | Some bits by: Rajesh Prabhakaran <rajeshpr@lsil.com>
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-2/+2
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Use __FBSDID().obrien2003-08-244-16/+20
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-222-4/+4
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* 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
OpenPOWER on IntegriCloud