summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/mfi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'krw2020-09-221-9/+9
| | | | | | | | | | | | member of 'struct scsi_xfer' has always been pointed at the 'struct scsi_generic cmdstore' member of the same instance. So nuke 'cmdstore' and remove the '*' from cmd. Take the address of cmd as required by the various casts. No intentional functional change. luna88k test by aoyama@, sparc64 test by jmatthew@ Identification of 2009's last *cmd use and ok jmatthew@
* Rename [READ|WRITE]_BIG to [READ|WRITE]_10. Rename struct scsi_rw_big tokrw2020-09-011-7/+7
| | | | | | struct scsi_rw_10. ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
* Turning on various scsi drivers' *DEBUG options reveals that this haskrw2020-07-241-12/+12
| | | | | | | | rarely (if ever) been done. Fix many printf format errors to calm clang and gcc on amd64, i386, hppa. Missing #include, complaints if 'option <blah>DEBUG' is used in config files, etc. All in debug code.
* Move remaining scsi bus initialization info from "prototype scsi link"krw2020-07-201-11/+9
| | | | | | | fields to struct scsibus_attach_args. Nuke the struct scsi_link * (saa_sc_link) in scaibus_attach_args. Explicitly initialize each field in scsibus_attach_args variables.
* Move the adapter related items (luns, adapter, adapter_target,krw2020-07-191-10/+11
| | | | | | | adapter_buswidth, adapter_softc) from struct scsi_link to struct scsibus_attach_args. Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
* Access adapter softc via link->bus->sb_adapter_softc.krw2020-07-161-8/+8
| | | | | | | | In sparc64 autoconf access 'luns' via sb_luns and 'adapter_buswidth' via sb_adapter_buswidth. Removes last post-config uses of the copies of bus related information in scsi_link.
* Where we have a pointer (sc) to the relevant adapter_softc, usekrw2020-07-131-2/+2
| | | | | &sc->sc_dev to get a device pointer rather than using the void * whence we obtained 'sc'.
* Remove some pointless casting of void * when assigning onekrw2020-07-131-3/+3
| | | | (scsi_link.adapter_softc) to a pointer of a particular softc type.
* Nuke trailing whitespace.krw2020-06-271-2/+2
|
* No need to bzero()/memset() 'struct scsibus_attach_args' variableskrw2020-06-271-3/+1
| | | | immediately before initializing the only field in the struct.
* Use SDEV_NO_ADAPTER_TARGET instead of -1 to indicatekrw2020-06-241-3/+3
| | | | | | the adapter is not a target on the bus. ok dlg@ as part of a larger diff.
* Simplify some goto'ing that jumps a single line orkrw2020-03-211-12/+6
| | | | | | | | | | does nothing at all. The first one spotted as CID 1452976. Reads good to millert@ ok mpi@
* Nuke *_minphys() functions that either simply apply MAXPHYS or dokrw2020-02-131-14/+3
| | | | | | | | nothing at all. MAXPHYS will be applied in minphys() and nothing at all, well, doesn't do anything. Also remove any '#define <blah> MAXPHYS' statements used solely to disguise MAXPHYS in said functions.
* Shuffle some names around to make reading the code less headachekrw2020-01-261-6/+6
| | | | | | | | inducing. Rename scsi_adapter member 'scsi_minphys' to 'dev_minphys' to reflect what it is supposed to do. Use consistent naming convention (<dev>_minphys) for the actual device functions. No functional change.
* Drivers that implement their own *minphys() don't need to call thekrw2020-01-251-2/+1
| | | | | | | system minphys(). scsi_minphys() will do that and cd/sd/st will call scsi_minphys(). ok jmatthew@ as part of larger diff
* Use a consistant idiom/format when declaring scsi_adapter structureskrw2020-01-231-7/+3
| | | | | | | | | | | in drivers. Terse one liners, NULLs instead of 0's, explicitly specify all members, etc. Nuke #ifdef notyet blocks related to the scsi_adapter in aic. No intentional functional change. ok tedu@
* Convert infinite sleeps to {m,t}sleep_nsec(9).mpi2019-12-311-2/+2
| | | | ok kn@
* apply background init progress fix from r1.59 of mfii.cjmatthew2019-03-051-2/+9
| | | | | | | (reverting most of r1.60 of mfi.c, oddly enough) ok dlg@ tested on a SAS2008 (perc h310)
* return ENOTTY rather than EINVAL to indicate an ioctl hasn't been handledjmatthew2018-08-141-2/+2
| | | | ok dlg@ deraadt@ kettenis@
* If you use sys/param.h, you don't need sys/types.hderaadt2017-09-081-2/+1
|
* copy the mbox into the dcmd struct, not the pointer to the mbox.dlg2017-02-021-2/+4
| | | | | | | | makes bioctl work on mfi(4) again. while here memset a few mboxes before using them. bioctl breakage reported by jason george
* represent the mbox layout with union instead of an array of bytes.dlg2017-01-231-48/+49
| | | | | | | memcpying uint16_ts into inconsistently addressed offsets is hard to read, and this makes future work easier to implement. tested on mfi(4) and mfii(4)
* sizes for free(); ok sthenderaadt2015-09-091-18/+19
|
* Initial addition of ``Patrol Read'' support in bio(4), biocto(8), anduebayasi2015-05-291-1/+152
| | | | | | mfi(4). Based on FreeBSD, but done without mfiutil(8). OK deraadt@
* Prevent splassert from firing during sd_flush which runs "cold"mikeb2015-05-181-3/+4
| | | | | | | | While mfi(4) should pass SCSI transfer flags (e.g. SCSI_POLL and SCSI_NOSLEEP) down to the management function, make it at least use "cold" consistently for now. ok dlg
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* properly set sgl related flags on skinny controllers. this fixesdlg2015-03-081-3/+5
| | | | | | | io against physical disks on my dell perc h310s. logical disks still work fine. ok deraadt@ yasuoka@
* Fix mfi ioctl to set drive state properly.yasuoka2015-02-081-8/+22
| | | | | | | diff from Tsubai Masanari test dlg jmatthew ok dlg
* Add support DIOC{G,S}CACHE to mfi(4). Cache of disk on mfi(4) willyasuoka2015-01-091-5/+95
| | | | | | | | be enabled by default. Also if the controller doesn't have any RAM, the cache on the physical disk will be enabled. discuss with jsg tsubai ok dlg
* another handful of bcopy -> memcpy because there is no overlapderaadt2014-12-191-4/+4
|
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* mark the interrupt handler mpsafe, and give up biglock in the scsi cmddlg2014-09-091-1/+16
| | | | | | | | submission paths. take biglock again when calling back into the scsi stack. tested on a variety of cards here, including the skinny mfis on the firewall next to mpsafe myx.
* Create a function which loads sgd in the mfi_iop_ops struct so that skinnyyasuoka2014-08-151-20/+63
| | | | | | | adapters can use "IEEE sgl". tested dlg yasuoka ok dlg jsg
* Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishianderaadt2014-07-131-4/+4
| | | | ok tedu
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-20/+20
| | | | after discussions with beck deraadt kettenis.
* format string fixes for bus_addr_t and bus_size_tsf2014-05-041-2/+2
| | | | | | bus_addr_t and bus_size_t are u_long everywhere ok kettenis@
* revert previous commit; didn't intend to commit those bitskettenis2014-02-201-6/+4
|
* Avoid printing the "nvram corrupt" message for onboard 2200s found on Sunkettenis2014-02-201-4/+6
| | | | | | hardware. ok dlg@, jmatthew@
* mfi_refresh_sensors calls mfi_ioctl_vol which calls mfi_bio_getitall, whichdlg2013-12-041-3/+8
| | | | | | | | replaces pointers in the softc and all sorts of fun stuff. this protects the call to bio_getitall with the sc_lock the ioctl path uses, so we dont get panics like those reported on bugs@ recently. ok deraadt@
* Add support for displaying the cache write policy of RAID volumes to bioctl(8)kettenis2013-10-231-1/+6
| | | | | | | and make mfi(4) pass up the necessary information. Adding support for other RAID controllers is left as an excercise to the reader. ok deraadt@
* Include the 'state of health' field in the bbu ok sensor value.jmatthew2013-10-091-3/+7
| | | | | | | | | The dell perc 6/i sets this to zero (meaning bad) when it decides the battery doesn't have enough capacity for it to allow write back mode, but doesn't set any of the other flags to tell us why. ok dlg@, tested by sthen@
* enw->new in comment;jmc2013-05-181-2/+2
| | | | spotted by krw, missed by jsg, and forwarded From: Alexey Suslikov
* fix some leaks in error pathsjsg2013-05-081-3/+7
| | | | ok fgsch@ krw@ kettenis@
* break out the battery status into excruciating detail. makes it harder fordlg2013-05-031-14/+82
| | | | | $VENDOR to complain about a lack of diagnostic material from their crappy mgmt tools if you're not running an operating system they support.
* always attach the battery sensor if the adapter lets us query it.dlg2013-05-021-3/+2
| | | | newly replaced batteries dont show up immediately.
* provide a sensor for the battery backup unit (bbu) on mfi boards thatdlg2013-05-011-5/+59
| | | | | | support it. now i can tell (a bit better) why io might be slow on some of my boxes.
* dont need to walk alldevs during sensor creation looking for the logicaldlg2013-05-011-16/+2
| | | | | | | | disk scsibus when we record that in mfi_attach. also happens to get rid of a logic error that let it come out of the loop on alldevs with a reference to something that wasnt the logical disk scsibus and use that.
* use MR_DCMD consistently. some MD_DCMD was in there somehow.dlg2013-04-301-6/+6
|
* david imhoff points out that the error handling in mfi_init_ccb gets thedlg2013-04-071-5/+2
| | | | | | | | | | index to which ccb to free wrong. this takes the logic from mpi/mpii/mfii which pulls the ready ccbs off the free list rather than rely on the current index from the for loop that we failed inside of. thanks to david for finding this out.
* Make sure we don't sleep on autoconf.haesbaert2012-09-121-2/+2
| | | | ok mikeb