summaryrefslogtreecommitdiffstats
path: root/sys/dev/atapiscsi (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'krw2020-09-221-11/+11
| | | | | | | | | | | | 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@
* Nuke unused struct scsi_link members of adapter softc's where thekrw2020-07-221-2/+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-5/+6
| | | | | | | 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-7/+7
| | | | | | | | 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.
* Shuffle things around so that sc->sc_link initialization iskrw2020-07-021-9/+10
| | | | even more concentrated just before config_found().
* 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 '7' to indicate the adapter iskrw2020-06-241-2/+2
| | | | | | not a target on the bus. adapter_buswidth is 2. ok dlg@ as part of a larger diff.
* Nuke *_minphys() functions that either simply apply MAXPHYS or dokrw2020-02-131-11/+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.
* 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-8/+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@
* Delete unnecessary <sys/file.h> includesguenther2017-12-301-2/+1
| | | | ok millert@ krw@
* Fix previous by calling wdc_atapi_intr_complete() before rerturning.mpi2017-08-111-1/+2
| | | | Suggested by and ok millert@
* Missing break/return statement on switch casemestre2017-08-111-1/+3
| | | | | | Coverity CID 1453394 OK deraadt@
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* scsi has to scrub the ata xfer before using it so its set for the restdlg2014-01-191-1/+2
| | | | | | of the ata stuff to properly handle. found by dtucker@
* move atapiscsi to iopools by making the entire ata layer use them too.dlg2014-01-181-8/+5
| | | | | | | | | | | | | | | 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@
* Convert from K&R to ISO function signatures.matthew2012-08-081-107/+40
| | | | From Brad; no binary change on amd64.
* 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@
* wdc.c doesn't use NATAPISCSI, so no point in including atapiscsi.h.matthew2011-05-251-2/+2
| | | | | It's the last file referencing atapiscsi.h too, so might as well get rid of the need-flags in files.atapiscsi.
* Change wdc_reset_channel() to take a `no wait' argument. Pass in turn thismiod2011-04-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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@
* Do not #include <sys/dkstat.h> if you don't need anything from it.miod2010-11-181-3/+1
| | | | ok krw@ deraadt@
* Use SSD_ERRCODE_CURRENT instead of magic 0x70.krw2010-09-201-2/+2
| | | | ok dlg@ matthew@
* Wake up cdroms attached to pciide; same as in wd.c 1.86deraadt2010-08-041-2/+29
| | | | tested by phessler
* Manuel Bouyer rescinded clauses 3 and 4 of his license text.jsg2010-07-231-7/+1
|
* Change scsibus(4)'s scsi_link array to an SLIST to save memory onmatthew2010-07-011-2/+2
| | | | | | sparsely populated buses. ok dlg@, krw@
* Remove all adapter-specific 'struct scsi_device's. They are never used. Firstkrw2010-06-281-10/+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-6/+4
| | | | | | | 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@
* Change the scsi_cmd function member of scsi_adapter from int tokrw2010-03-231-10/+9
| | | | | | | | | | | | | 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@
* Don't check ITSDONE since we know it is set in scsi_done(). Eliminateskrw2010-01-111-20/+12
| | | | | | | possible references to xs which has been recycled. Slight tweak to dlg's previous fix for atapiscsi. ok dlg@ 'looks safe' miod@
* dont need to end statements with two semicolons. one is enough.dlg2010-01-051-2/+2
| | | | pointed out by miod@ and claudio@
* atapiscsi didnt call scsi_done when the xfer had SCSI_POLL set. this isdlg2010-01-051-6/+8
| | | | | | | | | | | | | | 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@
* typo in documentation; missing full stop.sobrado2009-11-271-2/+2
| | | | from Dawe.
* call scsi_done before returning COMPLETE in the stuffup case.dlg2009-09-051-1/+4
| | | | pointed out by miod
* Force atapiscsi to depend upon wdc_base. This allows kernels to havemiod2009-06-201-2/+2
| | | | | atapiscsi* at umass? without needing to have pciide or wdc attachments.
* Extend the scsi_adapter minphys() callback to take a struct scsi_link *miod2009-02-161-4/+4
| | | | | | as additional argument. This will allow intermediate layers between scsi devices such as sd and scsi host adapters to take appropriate action if necessary.
* Another bunch of TRY_AGAIN_LATER -> NO_CCB when no I/O could be started.krw2008-11-251-2/+2
| | | | "looks sane to me" marco@
* never schedule a timer for a negative time, if in the past schedule short delay.drahn2008-05-221-2/+6
| | | | please commit deraadt@
* More scsi_done() at SPLBIO.krw2007-11-061-1/+4
|
* Fix some "that that"s.tom2007-08-061-2/+2
| | | | ok miod@ jmc@
* Consistently spell FALLTHROUGH to appease lint.jsg2007-02-141-4/+4
| | | | ok kettenis@ cloder@ tom@ henning@
* give scsi controllers a real attach args to fill in when attaching scsibus.dlg2006-11-281-3/+6
| | | | ok miod@ marco@ deraadt@
* fetch the name of the cd device attached to the atapiscsi scsibus bydlg2006-10-221-11/+6
| | | | | 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.
* strncpy -> strlcpydlg2006-10-221-5/+5
|
* Enable detaching atapiscsi devices.miod2006-01-131-2/+11
|
* spacing; ok deraadt@david2005-08-011-2/+2
|
* Cosmetics...tdeval2005-03-081-5/+5
| | | | | Mainly remove space between locators parens, replace spaces with tabs where appropriate and consistently align dependencies.
* SCSI_DATA_OUT doesn't mean transfer from host in all cases, whengrange2004-02-211-3/+6
| | | | | | | | | | requesting sense we reuse the same scsi xfer so flags lie and we should check for C_SENSE too. Eliminates pciide timeouts at the end of every burning with cdrecord. Bug introduced, found and then fixed by costa@. ok costa@ krw@