summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/mfi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* add support for "physical devices" on skinny controllers.dlg2012-08-171-14/+183
| | | | | | | | | | | these controllers let you specify disks that should be accessed directly rather than be part of logical volumes. apparently you can plug in things like tape drives too. anyway, physical devices are exposed via a separate scsibus attached to mfi. ok mikeb@
* fix mfi_poll by having it do delays between loops, and breaking ondlg2012-08-161-35/+47
| | | | | | | timeouts. how embarrassment. implement mfi_exec for doing sync executions of commands in process contexts and cut mfi_mgmt over to it.
* rework mfi_poll so it will do all the completions on a ccb includingdlg2012-08-161-47/+45
| | | | | | | calling the done handler. this makes it consistently complete scsi io with all the proper error checking.
* stop passing mfi_softc around as a member of the ccb, consistently give itdlg2012-08-161-36/+30
| | | | as the first argument to functions. like mfii.
* scrub ccbs when we're about to use them, not when we put them backdlg2012-08-161-8/+16
| | | | | on the free list. ccbs can be reused, so we dont want old state screwing up new commands.
* move the dma syncs for the ccb data into ccb_done, so we can do it oncedlg2012-08-161-24/+10
| | | | rather than put the code everywhere.
* fix up the dma sync for the command frame in mfi_done.dlg2012-08-161-2/+3
|
* use scsi_get_link to find out the name of a child device for bioctl ratherdlg2012-08-141-12/+10
| | | | | | than snoop scsi commands and copy it in an io path. no functional change, but the code has one less XXX now.
* expose the max number of logical volumes the hardware supports as the widthdlg2012-08-141-12/+7
| | | | | | | | | | | | | | of its scsibus. only advertise 1 lun on logical volumes instead of letting the midlayer fix it up to 8. give every target on the bus max_cmds openings. iopools means they will properly share access to them. this in particular is useful on skinny controllers which only advertise 31 command slots. if you have 16 volumes, theyll only get 1 opening each with the old maths. this way round the ones that are busy will share the slots. tested on a perc5 with two volumes and hard workloads.
* print the boards name (eg, perc 5/i) according to the firmware like mfii.dlg2012-08-141-6/+6
| | | | ok deraadt@
* move knowledge of the location of the inbound doorbell out of code indlg2012-08-141-13/+12
| | | | | | transition_firmware into a member of the iop structures. ok mikeb@ haesbaert@
* get rid of the last foo_lo and foo_hi bits i could find in the hardwaredlg2012-08-131-14/+6
| | | | | | | | | | structures and use htole64 instead of htole32(addr >> 32); htole32(addr); gets rid of "handy" stack variables to get the dva to 64bits. sprinkle some more byte swaps for things that should have it. tested on a perc5 (xscale)
* do appropriate bus_dmamapy_syncs around the pcq/completion ring.dlg2012-08-131-3/+14
| | | | tested on a perc5 (xscale)
* replace uint32_ts for hi and lo addresses in the mfi_init_ hardwaredlg2012-08-131-32/+16
| | | | | | | | | descriptors with single uint64_ts. theyre not some weird middle endian thing. this makes the code more readable. add some missing htole32s to the code while here. tested on a perc5 (xscale).
* the producer/consumer values are used by the device, which is littledlg2012-08-111-4/+4
| | | | | | endian. do appropriate byteswapping for when the host cpu uses them. tested on a perc5 (xscale) in an amd64.
* add support for skinny variants.dlg2012-01-121-3/+59
| | | | | from Alexey Suslikov reviewed by marco
* Backout a bunch of my SCSI commits from c2k11. At least one of thesematthew2011-07-171-2/+2
| | | | | | is causing problems when trying to boot sparc64 from an isp(4). Verified to fix the sparc64/isp(4) regression by krw@; ok deraadt@
* First batch of converting SCSI HBAs from setting saa_targets andmatthew2011-07-081-2/+2
| | | | | | saa_luns instead of adapter_buswidth and luns in the prototype link. ok dlg@, miod@
* add all 64 bit dma plumbing but stick with 32 for now by default.marco2011-04-091-14/+29
| | | | ok deraadt
* make sure the upper 32 bits are always written to instead of assuming itmarco2011-04-091-14/+32
| | | | | | is 0. ok deraadt.
* kill some stray spacesmarco2011-04-081-5/+5
|
* rename wiat channel to something less than 8 chars.marco2011-04-081-2/+2
| | | | prompted by deraadt
* use dma_alloc for transient management commands.marco2011-04-081-13/+36
| | | | prodded and ok deraadt
* cut mfi over to using iopools.dlg2010-12-301-49/+42
| | | | | | | | | | | | this gets rid of NO_CCB, provides better scheduling of io between busy logical volumes on the same controller, and makes the ioctl and sensor paths more reliable. this is the least intrusive version of this change i could come up with. it only took 4 or 5 goes... ok marco@ deraadt@ says this is a good time for this change.
* no use setting cmd in mfi_ioctl_setstate if you never use it.dlg2010-09-241-6/+1
|
* Use SSD_ERRCODE_CURRENT instead of magic 0x70.krw2010-09-201-2/+3
| | | | ok dlg@ matthew@
* the scsi completion code thinks that if you dont get MFI_STAT_OKdlg2010-08-291-5/+16
| | | | | | | | | | back from the chip on a command then the command completely failed. MFI_STAT_SCSI_DONE_WITH_ERROR really means the command completed fine, but there's some sense data too. this tweaks the handling to be more appropriate, as per the linux and solaris drivers. timed out waiting for beck@ putting this in cos its obviously more correct than the current code.
* SCSI HBA drivers are supposed to get their SCSI CDBs from xs->cmd, notmatthew2010-07-221-2/+2
| | | | | | | xs->cmdstore. ok krw@ a while back (contingent upon testing), and deraadt@ says this has been in snapshots for weeks now.
* Change scsibus(4)'s scsi_link array to an SLIST to save memory onmatthew2010-07-011-3/+5
| | | | | | sparsely populated buses. ok dlg@, krw@
* Use SLIST for the ccb free list.mk2010-06-301-5/+5
| | | | ok krw, discontent grunts from marco.
* Remove all adapter-specific 'struct scsi_device's. They are never used. Firstkrw2010-06-281-6/+1
| | | | | | | | step in elminating 'struct scsi_device' entirely. Spotted and initial diff from matthew@. ok matthew@ dlg@ deraadt@ marco@ miod@
* dont pass the dev_t from the scsi device drivers into the midlayer fordlg2010-06-151-4/+3
| | | | | | | ioctl requests, and dont pass the proc pointers around for any ioctl requests in scsi land at all. neither were used, so trim the fat. ok krw@ marco@
* New scsi code seems to be stable. Pluck previously identifiedkrw2010-05-201-8/+1
| | | | | | | low-hanging splbio/splx pairs that are no longer needed and see if this reveals any hidden scsi flaws. ok dlg@
* Use a temporary variable for now to sidestep -Wbounded checking whennicm2010-05-161-5/+7
| | | | | | | copying vendor[8]/product[16]/revision[4] out of struct scsi_inquiry_data together with one memcopy. ok krw
* use BUS_DMA_ZERO on alloc instead of bzeroing after.oga2010-04-221-3/+2
| | | | ok dlg@, marco@
* grrr var names in protosmarco2010-04-101-13/+13
|
* sprinkle some bus_dmamap_sync around frame access.marco2010-04-101-5/+29
| | | | prompted by oga
* Change the scsi_cmd function member of scsi_adapter from int tokrw2010-03-231-7/+10
| | | | | | | | | | | | | void. Use XS_NO_CCB error in the scsi command (xs) to report the NO_CCB condition. Eliminates all SUCCESSFULLY_QUEUED and COMPLETE confusion and untangles the midlayer from the adapter a bit more. Eyes and some fixes by miod@ There may be some compile issues on little used (i.e. I don't have any) drivers but the change is mechanical and thus easy to remedy. ok dlg@
* Zap all setting of ITSDONE in drivers that don't look at it. Nobodykrw2010-01-091-4/+1
| | | | | | | else cares so it's just noise. Drivers that actually look at ITSDONE are unchanged. ok marco@ (for his files) dlg@ beck@
* rename ccb_xs to ccb_cookie and change its type from a scsi_xfer * to adlg2010-01-041-5/+5
| | | | | void *. this lets us pass things other than scsi_xfers to ccb completion handlers.
* protect the ccb free queue with a mutex rather than splbiodlg2010-01-041-8/+7
|
* change M_WAITOK --> M_WAITOK|M_CANFAILchl2010-01-031-2/+2
| | | | | | | | with input from marco@ ok marco@ krw@ this was ok looooooooong time ago but lost in my mailbox
* Add READ(16) & WRITE(16) commands.marco2009-04-301-8/+22
| | | | ok krw
* MFI_D_IOCTL should be commented out. No binary change.marco2009-04-291-2/+2
|
* scrub more fields in the ccb when returning them to the free list afterdlg2009-04-041-2/+6
| | | | | | | | | | theyve been used, in particular the mfi header flags which has a bit that specifies if a command should be completed via the interrupt path. if we use a ccb during boot we set that bit, but it isnt necessarily cleared by things that use it later on. this means a ccb we expected to complete via an interrupt never actually generates an interrupt or appears in the reply queue. this obviously stalls the io.
* spellomarco2009-03-291-2/+2
|
* when we steal the SYNC CACHE command in mfi_scsi_cmd we still have todlg2009-03-291-2/+3
| | | | | mark the xs as done and call scsi_done for it rather than just returning COMPLETE.
* fix a small race in mfi_mgmt between the checking of a ccbs completion anddlg2009-03-291-1/+4
| | | | | | the sleep waiting for the completion. it is possible to get the interrupt completing the command just before the tsleep, which will never get a wakeup because the interrupt with the wakeup has already happened.
* Extend the scsi_adapter minphys() callback to take a struct scsi_link *miod2009-02-161-3/+3
| | | | | | as additional argument. This will allow intermediate layers between scsi devices such as sd and scsi host adapters to take appropriate action if necessary.
* Add support for next generation megaraid sas raid controllers.marco2009-01-281-1/+51
| | | | From Jim Giannoules <gortag@gmail.com>