summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/ciss.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'krw2020-09-221-2/+2
| | | | | | | | | | | | 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@
* Turning on various scsi drivers' *DEBUG options reveals that this haskrw2020-07-241-3/+3
| | | | | | | | 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-5/+5
| | | | | | | 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-6/+6
| | | | | | | 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-2/+2
| | | | | | | | 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-1/+3
| | | | statement. All to make upcoming diff(s) smaller and easier to read.
* No need to bzero()/memset() 'struct scsibus_attach_args' variableskrw2020-06-271-2/+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.
* Nuke *_minphys() functions that either simply apply MAXPHYS or dokrw2020-02-131-13/+2
| | | | | | | | 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-4/+4
| | | | | | | | 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
* ciss(4): tsleep(9) -> tsleep_nsec(9)cheloha2020-01-231-16/+16
| | | | | | | | | | | "i" is a count of milliseconds. We convert it to a starting interval "ts" and determine our absolute timeout "end". Then we loop through until the poll is successful or "end" elapses. This could be simplified with an absolute timeout interface for tsleep(9) but alas, we don't have one yet. ok krw@
* ciss(4): ciss_cmd: split polling loop into two loopscheloha2020-01-231-8/+15
| | | | | | | | | | | | There are really two loops here. One for SCSI_NOSLEEP and delay(9), the other for tsleep(9). The paths share a loop in the code but they shouldn't. They have different termination conditions and share little code. If we pull the conditional clause out of the for-loop and then give each path its own polling loop the logic should be easier to follow. ok krw@
* ciss(4): de-indent polling logiccheloha2020-01-201-70/+72
| | | | | | Should make untangling the polling logic simpler. "Sure." krw@
* change some types in bio from u_quad_t to uint64_t, and fix casts indlg2016-08-141-2/+2
| | | | | | drivers that fill that field in too. quad types are going away.
* sizes for free(); ok sthenderaadt2015-09-091-2/+3
|
* add missing CISS_UNLOCK_SCRATCH/splx callsjsg2015-05-031-3/+7
| | | | ok krw@
* 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@
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* 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-2/+2
| | | | after discussions with beck deraadt kettenis.
* Enforce ca_activate tree-walks over the entire heirarchy for all events,deraadt2013-05-301-8/+1
| | | | | | cleaning up some shutdown-hook related code on the way. (A few drivers related to sparc are still skipped at kettenis' request) ok kettenis mlarkin, tested by many others too
* Death to inappropriate whitespace. First one pointed out by Brad.krw2011-11-101-4/+4
|
* 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-3/+3
| | | | | | saa_luns instead of adapter_buswidth and luns in the prototype link. ok dlg@, miod@
* - use nitems() no binary change on amd64jasper2011-04-051-2/+2
| | | | "reads OK" claudio@
* Use SSD_ERRCODE_CURRENT instead of magic 0x70.krw2010-09-201-3/+5
| | | | ok dlg@ matthew@
* bus_dmamap_sync was using xs->flags to determine which directiondlg2010-09-201-4/+4
| | | | | | | | | | | | to sync the map. unfortunately xs is not set for internal ciss commands, so this is a null deref. it wasnt until kettenis made bus_dmamap_sync a real function which needed its arguments evaluated that this became a real problem though. hit by mcbride@ and sakurai-san. fixed by krw@ over my shoulder when we figured out which specific chunk of code was faulting. tested by sakurai-san ok krw@ deraadt@
* set each disks openings to the maximum number the controller can handle.dlg2010-07-071-2/+2
| | | | | | | iopools make sure resources arent overallocated, while scheduling them evenly between devices. tested by and ok jsg@
* Make the sensor setup loop less awkward by moving the call tomatthew2010-07-021-3/+3
| | | | | | sensor_attach() out of the for loop header. ok marco@
* compile when SMALL_KERNEL is setderaadt2010-07-011-2/+3
|
* Change scsibus(4)'s scsi_link array to an SLIST to save memory onmatthew2010-07-011-5/+5
| | | | | | sparsely populated buses. ok dlg@, krw@
* 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@
* If you put CISS_LOCK()/CISS_UNLOCK() around a switch statement, youkrw2010-06-261-3/+5
| | | | | | must break out of the cases, not directly 'return' error codes. I think the error case is currently impossible, but why leave an armed bear trap lying about?
* 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@
* get rid of the kthread. it is unused and just bloats the kernel.dlg2010-06-031-30/+1
| | | | pointed out by brad.
* replace TAILQs with SLISTs for managing the ccb free list. theyre smaller.dlg2010-06-031-6/+7
|
* useless abstraction is, by definition, useless.dlg2010-06-031-2/+2
| | | | dont typedef the tailq head struct.
* convert ciss(4) over to using iopools. this is fairly easy after the recentdlg2010-06-021-37/+35
| | | | | | | | | | tweaks ive made. this provides better concurrent access to multiple volumes on the same hba, while improving the reliability of the ioctl and sensor codepaths. tested by okan@ halex@ ok krw@ okan@ halex@
* its pretty obvious that ciss_cmd should be called with splbio being held,dlg2010-06-021-6/+38
| | | | especially if you're passing it SCSI_POLL too.
* call scsi_done before put_ccb, rather than have put_ccb call scsi_donedlg2010-06-021-8/+7
| | | | for us.
* push the "locking" in ciss_scsi_cmd down. we dont need splbio to calldlg2010-06-021-5/+2
| | | | scsi_done or to get or put ccbs anymore.
* protect the ccb free queue with its own mutexdlg2010-06-021-2/+9
|
* get rid of useless ccb queues. when the ccb is on the chip, we mark itsdlg2010-06-021-5/+1
| | | | | state as such, putting it on a queue is silly. one of the queues was initted by never used.
* get rid of the code for the passthru bus support. it was never enabled anddlg2010-06-021-81/+1
| | | | confuses the code and bloats the kernel.
* interrupt handlers are run at their IPL, so there's no need to go splbiodlg2010-06-021-6/+1
| | | | | in a disk controllers handler, even if it has a useless bunch of macros around it.
* do not immediately panic if we find a non-increasing heartbeat counter buthalex2010-05-311-4/+17
| | | | | | keep count for at least 33 seconds. then panic. ok marco@, moral support johan@
* BUS_DMA_ZERO instead of alloc, map, bzero.oga2010-05-191-5/+3
| | | | ok krw@
* Change the scsi_cmd function member of scsi_adapter from int tokrw2010-03-231-23/+18
| | | | | | | | | | | | | 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-2/+1
| | | | | | | else cares so it's just noise. Drivers that actually look at ITSDONE are unchanged. ok marco@ (for his files) dlg@ beck@