summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/ips.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Replace simple one-line bcopy()/memcpy() of faked data into scsi_xfer with callkrw2020-10-151-4/+4
| | | | | to scsi_copy_internal_data(). Thus getting xs->resid properly set and adding the usual uio/size sanity checks.
* 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@
* Replace '32' with SID_SCSI2_ALEN (a.k.a. 31) when building emulated INQUIRYkrw2020-09-051-2/+2
| | | | | responses. This is what the SCSI specifications say is the correct value and already used in several cases.
* Replace '.response_format = 2' with '.response_format = SID_SCSI2_RESPONSE'.krw2020-09-031-2/+2
|
* When building emulated INQUIRY results use the SCSI_REV_* #define's tokrw2020-09-021-2/+2
| | | | initialize the 'version' field. Not numbers.
* 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-2/+2
| | | | | | | | 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.
* Nuke unused struct scsi_link members of adapter softc's where thekrw2020-07-221-4/+1
| | | | driver successfully compiles on one or more of amd64, i386, hppa.
* Move remaining scsi bus initialization info from "prototype scsi link"krw2020-07-201-12/+12
| | | | | | | 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-9/+12
| | | | | | | 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-4/+4
| | | | | | | | 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.
* Expunge some Captain Obvious comments, tweak whitespace a bit, move a debugkrw2020-07-111-2/+2
| | | | statement. All to make upcoming diff(s) smaller and easier to read.
* 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 the value that is beingkrw2020-06-241-2/+2
| | | | | | | aassigned to adapter_buswidth to indicate the adapter is not a target on the bus. ok dlg@ as part of a larger diff.
* ips(4): tsleep(9) -> tsleep_nsec(9)cheloha2020-02-191-12/+8
| | | | | | | | While here, get rid of the "timo" variable completely. In the SCSI_NOSLEEP path of ips_poll() use "usecs" and in the opposite path use "msecs". ok krw@
* Let's all agree to call our scsi_adapter variable '<dev>_switch'.krw2020-02-141-5/+5
|
* IPS_MAXFER, NAX_XFER, and MAXBSIZE are all definedkrw2020-02-141-4/+3
| | | | | | as (64 * 1024). Reduce confusion by using MAXPHYS (a.k.a. (64 * 1024)) as other drivers do.
* Nuke unnecessary abstraction 'scsi_minphys()' which just callskrw2020-02-051-3/+3
| | | | | | 'minphys()'. Just use & check for NULL instead, since 'minphys()' is always called on the code path ([cd|sd|st]minphys) that calls physio().
* Use a consistant idiom/format when declaring scsi_adapter structureskrw2020-01-231-11/+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@
* change some types in bio from u_quad_t to uint64_t, and fix casts indlg2016-08-141-3/+3
| | | | | | drivers that fill that field in too. quad types are going away.
* sizes for free(); ok sthenderaadt2015-09-101-4/+5
|
* 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@
* Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishianderaadt2014-07-131-3/+3
| | | | ok tedu
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-4/+4
| | | | after discussions with beck deraadt kettenis.
* Backout a bunch of my SCSI commits from c2k11. At least one of thesematthew2011-07-171-3/+3
| | | | | | 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@
* Call bzero(&saa, sizeof(saa)) each time we use saa to attachmatthew2011-07-051-2/+2
| | | | | | | | something. Doesn't matter right now because scsibus_attach_args only has one field and it's mandatory, but I'm planning to move some more fields from scsi_link to scsibus_attach_args+scsibus_softc. ok dlg@
* move ips to iopools. its the usual drill, io between volumes is nowdlg2011-04-061-85/+33
| | | | | | scheduled better, ioctl paths are more reliable, and it removes NO_CCB. ok krw@
* Force openings to 1 for devices that can't do tagged i/o, i.e. morekrw2010-10-121-1/+2
| | | | | | | | | | | | | | than 1 i/o active at once. This reduces the chances that concurrent i/o's for such devices will confuse the device or the adapter code. It also eliminates a reason for adapter code to maintain its own queues. Tweak all drivers that fake INQUIRY results to set the SID_CmdQue flag, thus continuing to claim to be able to do tagged i/o. Positive feedback from matthew@ and marco@ for an earlier version. ok dlg@
* Use SSD_ERRCODE_CURRENT instead of magic 0x70.krw2010-09-201-2/+2
| | | | ok dlg@ matthew@
* make this compile with SMALL_KERNELderaadt2010-07-011-6/+7
|
* Change scsibus(4)'s scsi_link array to an SLIST to save memory onmatthew2010-07-011-4/+5
| | | | | | sparsely populated buses. ok dlg@, krw@
* Use a SLIST for the ccb free list.mk2010-06-301-10/+10
| | | | ok krw
* Remove all adapter-specific 'struct scsi_device's. They are never used. Firstkrw2010-06-281-17/+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-5/+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-15/+1
| | | | | | | low-hanging splbio/splx pairs that are no longer needed and see if this reveals any hidden scsi flaws. ok dlg@
* update a random sampling of drivers after the proc.h -> systm.h movetedu2010-04-061-2/+1
|
* Change the scsi_cmd function member of scsi_adapter from int tokrw2010-03-231-24/+31
| | | | | | | | | | | | | 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-3/+1
| | | | | | | else cares so it's just noise. Drivers that actually look at ITSDONE are unchanged. ok marco@ (for his files) dlg@ beck@
* Reorganize NBIO and SMALL_KERNEL handling again but this time withoutgrange2009-03-231-15/+18
| | | | ramdisk breakage.
* unbreak ramdisk builds in a way i guess might workderaadt2009-03-221-3/+1
|
* Update volume info on every bio call instead of waiting for thegrange2009-03-221-5/+11
| | | | sensors task to do it.
* Don't show rebuild status for offline volumes.grange2009-03-221-3/+1
|
* Put recently added bio and sensors stuff under #if NBIO > 0 andgrange2009-03-221-2/+6
| | | | #ifndef SMALL_KERNEL respectively.
* If rebuild is active set volume state to ``rebuild''.grange2009-03-211-2/+4
|
* Report rebuild progress only if rebuild is active.grange2009-03-211-2/+2
|
* IPS_MAXTARGETS should be 16, not 15.grange2009-03-211-5/+5
|
* Be smart when attaching pass-through scsibuses. Use configurationgrange2009-03-211-14/+24
| | | | | | data to check if channel has any devices besides disks and set the actual bus width. This will speedup booting. Also remember enclosure address here instead of messing with inquiry data.
* Looks like the ``params'' field in the physical device descriptiongrange2009-03-211-3/+5
| | | | | contains SID_TYPE. Use to to filter out non disks from the bioctl output.