summaryrefslogtreecommitdiff
path: root/sys/dev/atapiscsi/atapiscsi.c
AgeCommit message (Collapse)Author
2024-06-22remove space between function names and argument listJonathan Gray
2024-05-26remove unneeded includesJonathan Gray
2022-04-16constify SCSI adapter entry pointsChristian Weisgerber
ok krw@
2022-04-06constify struct cfattachChristian Weisgerber
2022-01-09spellingJonathan Gray
feedback and ok tb@ jmc@ ok ratchov@
2020-09-22Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'Kenneth R Westerback
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@
2020-07-22Nuke unused struct scsi_link members of adapter softc's where theKenneth R Westerback
driver successfully compiles on one or more of amd64, i386, hppa.
2020-07-20Move remaining scsi bus initialization info from "prototype scsi link"Kenneth R Westerback
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.
2020-07-19Move the adapter related items (luns, adapter, adapter_target,Kenneth R Westerback
adapter_buswidth, adapter_softc) from struct scsi_link to struct scsibus_attach_args. Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
2020-07-16Access adapter softc via link->bus->sb_adapter_softc.Kenneth R Westerback
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.
2020-07-02Shuffle things around so that sc->sc_link initialization isKenneth R Westerback
even more concentrated just before config_found().
2020-06-27No need to bzero()/memset() 'struct scsibus_attach_args' variablesKenneth R Westerback
immediately before initializing the only field in the struct.
2020-06-24Use SDEV_NO_ADAPTER_TARGET instead of '7' to indicate the adapter isKenneth R Westerback
not a target on the bus. adapter_buswidth is 2. ok dlg@ as part of a larger diff.
2020-02-13Nuke *_minphys() functions that either simply apply MAXPHYS or doKenneth R Westerback
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.
2020-01-25Drivers that implement their own *minphys() don't need to call theKenneth R Westerback
system minphys(). scsi_minphys() will do that and cd/sd/st will call scsi_minphys(). ok jmatthew@ as part of larger diff
2020-01-23Use a consistant idiom/format when declaring scsi_adapter structuresKenneth R Westerback
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@
2017-12-30Delete unnecessary <sys/file.h> includesPhilip Guenther
ok millert@ krw@
2017-08-11Fix previous by calling wdc_atapi_intr_complete() before rerturning.Martin Pieuchot
Suggested by and ok millert@
2017-08-11Missing break/return statement on switch caseRicardo Mestre
Coverity CID 1453394 OK deraadt@
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-01-19scsi has to scrub the ata xfer before using it so its set for the restDavid Gwynne
of the ata stuff to properly handle. found by dtucker@
2014-01-18move atapiscsi to iopools by making the entire ata layer use them too.David Gwynne
this would have been difficult before because the ata completion paths try to be helfpul by freeing xfers on the adapters behalf, whch doesn't work in the new world scsi model where the layer that allocated the thing is responsible for freeing it, and expects to get it back and maybe use it again. however, deraadt@ added magic flags for hibernate that im now using to keep ata xfers for the scsi layers. committing this now so itll be tested. i cant think of a better time to handle fallout from diffs like this than hackathons. discussed with deraadt@
2012-08-08Convert from K&R to ISO function signatures.Matthew Dempsky
From Brad; no binary change on amd64.
2011-07-17Backout a bunch of my SCSI commits from c2k11. At least one of theseMatthew Dempsky
is causing problems when trying to boot sparc64 from an isp(4). Verified to fix the sparc64/isp(4) regression by krw@; ok deraadt@
2011-07-08First batch of converting SCSI HBAs from setting saa_targets andMatthew Dempsky
saa_luns instead of adapter_buswidth and luns in the prototype link. ok dlg@, miod@
2011-04-15Change wdc_reset_channel() to take a `no wait' argument. Pass in turn thisMiod Vallat
argument to wdcreset(), to have it skip waiting until active channels see their BUSY bit clear in the status register. Use this feature in the resume path, during the first reset operation. The first reset is supposed to only wake up the controller, and the disks don't come back until the second reset is issued, therefore waiting for them to report themselves as ready after the first reset, but before the second, is moot - and as a matter of fact some controllers, such as the AMD 754 and clones/offspring (e.g. Geode) keep the BUSY bit asserted after the first reset. Last, but not least, make sure wd@ata invokes wd_get_params() again before returning from the resume code, as we will still be using polled transfers for a short while. This causes the Lemote Yeelong to resume within less than one second, instead of the lousy 30 seconds wait between the two resets; and the wd_get_params() voodoo prevents it from getting spurious ide interrupts afterwards. wd_get_params() magic from dlg; rest of the work by yours truly after enough prodding by dlg@ and pirofti@, among others. ok deraadt@ dlg@
2010-11-18Do not #include <sys/dkstat.h> if you don't need anything from it.Miod Vallat
ok krw@ deraadt@
2010-09-20Use SSD_ERRCODE_CURRENT instead of magic 0x70.Kenneth R Westerback
ok dlg@ matthew@
2010-08-04Wake up cdroms attached to pciide; same as in wd.c 1.86Theo de Raadt
tested by phessler
2010-07-23Manuel Bouyer rescinded clauses 3 and 4 of his license text.Jonathan Gray
2010-07-01Change scsibus(4)'s scsi_link array to an SLIST to save memory onMatthew Dempsky
sparsely populated buses. ok dlg@, krw@
2010-06-28Remove all adapter-specific 'struct scsi_device's. They are never used. FirstKenneth R Westerback
step in elminating 'struct scsi_device' entirely. Spotted and initial diff from matthew@. ok matthew@ dlg@ deraadt@ marco@ miod@
2010-06-15dont pass the dev_t from the scsi device drivers into the midlayer forDavid Gwynne
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@
2010-05-20New scsi code seems to be stable. Pluck previously identifiedKenneth R Westerback
low-hanging splbio/splx pairs that are no longer needed and see if this reveals any hidden scsi flaws. ok dlg@
2010-03-23Change the scsi_cmd function member of scsi_adapter from int toKenneth R Westerback
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@
2010-01-11Don't check ITSDONE since we know it is set in scsi_done(). EliminatesKenneth R Westerback
possible references to xs which has been recycled. Slight tweak to dlg's previous fix for atapiscsi. ok dlg@ 'looks safe' miod@
2010-01-05dont need to end statements with two semicolons. one is enough.David Gwynne
pointed out by miod@ and claudio@
2010-01-05atapiscsi didnt call scsi_done when the xfer had SCSI_POLL set. this isDavid Gwynne
Bad. this sort of worked before because the midlayer would sleep on the ITSDONE flag in the scsi_xfer, which atapiscsi does set. however, with the introduction of scsi_xs_sync, it now sleeps on a condition that is only cleared if the adapter properly and correctly calls scsi_done when it is in fact done with the xfer. sorry guys. ok krw@
2009-11-27typo in documentation; missing full stop.Igor Sobrado
from Dawe.
2009-09-05call scsi_done before returning COMPLETE in the stuffup case.David Gwynne
pointed out by miod
2009-02-16Extend the scsi_adapter minphys() callback to take a struct scsi_link *Miod Vallat
as additional argument. This will allow intermediate layers between scsi devices such as sd and scsi host adapters to take appropriate action if necessary.
2008-11-25Another bunch of TRY_AGAIN_LATER -> NO_CCB when no I/O could be started.Kenneth R Westerback
"looks sane to me" marco@
2008-05-22never schedule a timer for a negative time, if in the past schedule short delay.Dale Rahn
please commit deraadt@
2007-11-06More scsi_done() at SPLBIO.Kenneth R Westerback
2007-08-06Fix some "that that"s.Tom Cosgrove
ok miod@ jmc@
2007-02-14Consistently spell FALLTHROUGH to appease lint.Jonathan Gray
ok kettenis@ cloder@ tom@ henning@
2006-11-28give scsi controllers a real attach args to fill in when attaching scsibus.David Gwynne
ok miod@ marco@ deraadt@
2006-10-22fetch the name of the cd device attached to the atapiscsi scsibus byDavid Gwynne
following the child device that attaches to us. this is cleaner than using the scsibus member of the adapters sc_link to look up the correct unit.
2006-10-22strncpy -> strlcpyDavid Gwynne
2006-01-13Enable detaching atapiscsi devices.Miod Vallat