summaryrefslogtreecommitdiffstats
path: root/sys/dev/atapiscsi (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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@
* Cleanup debug messages: use %b for status, %x -> 0x%x, wrap lines.grange2004-02-131-9/+12
|
* Always disable interrupts on a controller for polled commands.grange2004-02-071-2/+6
| | | | | | | | | This solves a long standing problem with hangs during attaching scsibus at atapiscsi on some i386 machines. Help in debugging the problem pval@. Testing pval@, deraadt@, david@ and me on several machines. ok costa@ tdeval@ pb@ deraadt@
* Nuke SDEV_NOLUNS, SDEV_FORCELUNS, and PQUIRK_FORCELUNS quirks. Alsokrw2004-01-141-2/+2
| | | | | | | | | | | | | | moreluns field in scsi_link structure. Instead, treat an INQUIRY result that duplicates the INQUIRY result of LUN 0 as proof the LUN does not exist. Compensate for lack of SDEV_NOLUNS where necessary by setting sc_link->luns to 1, which has the same effect. From Marco Peereboom. Don't issue Test Unit Ready command before INQUIRY command - not necessary and potentially harmful to devices with ADEV_NOTUR quirk since quirks have not been set yet. From mycroft@NetBSD ok deraadt@, mvme* changes by miod@.
* remove uvm_extern.hbrad2004-01-091-3/+1
| | | | | | tested on alpha, i386, powerpc, sparc64, m68k. ok miod@
* typos from Tom Cosgrove;jmc2003-10-211-3/+3
|
* Merge an old fix from NetBSD:grange2003-10-171-7/+2
| | | | | | | | | | - do not stop/unload current DMA operation if an IRQ was not detected by DMA engine unless the force flag was given, fixes DMA problems in shared IRQ setups; - ack interrupt before entering DMA codepath Tested by many. Work by niklas@ but he doesn't want to commit it for some reason.
* Allow setting of wdcdebug*_mask variables via preprocessor defines.grange2003-10-161-2/+5
| | | | This makes creating debug kernels be much more easy.
* kill trailing spaces, no functional changesgrange2003-09-281-67/+67
|
* Don't force all ATAPI devices to PIO mode 3, there aregrange2003-02-131-10/+5
| | | | | | | | | | devices which only support PIO mode 2 or less. Use atap_oldpiotiming to obtain supported mode for such devices. Also use SET FEATURES only for PIO mode > 2. Work by Alec Skelly <alec@dtkco.com> with my little help. ok costa@
* Protect WDCDEBUG_PRINT macro with do {} while (0)grange2002-12-191-4/+5
| | | | ok costa@
* Move enum definitions to global scope. Local scope is meaningless, andespie2002-05-211-2/+3
| | | | | | interferes with C99's anonymous stuff. ok millert@
* Dump the actual command to be sentcsapuntz2002-05-101-3/+3
|
* Drives can go busy after IDENTIFY. Make sure drive is not busy before issuingcsapuntz2002-05-081-2/+13
| | | | | SET PIO mode. Heh, this might have been the cause of all those old PIO mode aborts.
* Log extra info for ATAPI devicescsapuntz2002-03-161-10/+25
|