summaryrefslogtreecommitdiff
path: root/sys/scsi
AgeCommit message (Collapse)Author
2004-09-15target/lun attributes are optionalMichael Shalayeff
2004-08-01Remove openings = 1 and inherit the value from the HBA instead. This keeps ↵Marco Peereboom
the tape device stuffed with data and therefore it rewinds less often to reposition. ok krw@
2004-07-31Remove scsi_change_def() and related command structure. Its only useKenneth R Westerback
in the tree is #ifdef'd out and is fundamentally wrong anyway - it tries to force *all* devices to SCSI-2. Also recent SCSI specs seem to have marked the command as obsolete. Bonus - eliminates another undocumented option (SCSI_2_DEF). Found in a list of unused kernel functions posted to tech-kern@netbsd by Krister Walfridsson in 2002. ok marco@ tdeval@
2004-06-22Add additional retries in TUR to allow for tape devices to settle after a reset.Marco Peereboom
More informative failure message and silence "already open" message. ok krw@
2004-06-22Add additional retries in TUR to allow for tape devices to settle after a reset.Marco Peereboom
More informative failure message and silence "already open" message. ok krw@
2004-05-28Clean up sense error logic and printing a bit, partly inspired byKenneth R Westerback
NetBSD. Try to limit special handling of sense errors in sd and st to a minimum. ok marco@
2004-05-20Add QAS phase which is required by ahd. ok krw@Marco Peereboom
2004-05-17Elminate SCSIRET_* synonyms for EJUSTRETURN and ERESTART by usingKenneth R Westerback
EJUSTRETURN and ERESTART instead. Delete unused SCSIRET_RETRY define. From NetBSD. ok marco@
2004-05-17Add a quirk entry for TEAC compact cassette tape drive, taken from NetBSD.Kenji Aoyama
ok miod@ tdeval@ marco@ krw@
2004-05-13More cleanup of SCSI sense printing. Better output, more readable code.Kenneth R Westerback
ok millert@ deraadt@.
2004-05-09Remove some #ifndef __OpenBSD__/#endif sections that were intended toKenneth R Westerback
make sync'ing with NetBSD easier. NetBSD has moved on, most of these sections have not. ok marco@ deraadt@ grange@ csapuntz@
2004-05-09Eliminate verbosity parameter to scsi_print_sense and the associatedKenneth R Westerback
chunk of code. It was never executed unless you were debugging a mvmex8k 'vs' device. ok miod@ (mvmex8k bits) marco@ deraadt@
2004-05-09Add missing <cr>'s to various SC_DEBUG() calls, along with a few otherKenneth R Westerback
SC_DEBUG() spacing tweaks. ok deraadt@
2004-05-07Set value for rslt before trying to display it. 'Bad LUN ...' messsageKenneth R Westerback
will now display correct error value. Spotted in SCSIDEBUG output from Adrian Close's bizarre USB device. ok millert@ deraadt@ marco@.
2004-05-07Remove mvme88k workaround for ssh(4) bugs.Miod Vallat
2004-04-18Restore siop's (and possibly others) ability to negotiate tags/wide/sync byKenneth R Westerback
reverting to a single (short) INQUIRY command during probe. Compensate in siop by trying PPR on all targets on SCSI-3 buses and falling back to WDTR/SDTR if PPR rejected. Problem found by mickey@. Tested on a wide variety of devices by Marco. ok marco@ deraadt@.
2004-03-14Last pre-3.5 tweak: restore bus scanning to full speed by not performingKenneth R Westerback
double INQURY commands on LUNs that will be skipped anyway. From Marco Peereboom. ok deraadt@.
2004-03-10Simplify new LUN scanning logic, add diagnostic messages for allKenneth R Westerback
instances of bad LUNs and add SCSIFORCELUN_BUSES and SCSIFORCELUN_TARGETS options. ok miod@ deraadt@. Tested in the Marco Peereboom torture chamber.
2004-02-21Eliminate the quirks SDEV_NOSTARTUNIT, UMASS_QUIRK_NO_START_STOP, andKenneth R Westerback
UMASS_QUIRK_FORCE_SHORT_INQUIRY. Fixes a bunch of USB devices. Based on work by Mycroft in NetBSD. ok tdeval@ deraadt@.
2004-02-21Fix a race. scsi_done() can free a scsi_xfer, so relying on the valuesKenneth R Westerback
of fields in the scsi_xfer after scsi_done() could have been called is bad. cdrecord can now safely burn cd's at high speeds. Found by grange@, original diff by costa@, cleaned up by grange@ and further polished by me following input from deraadt@. ok grange@ costa@ deraadt@.
2004-02-17bzero scsi_xfer's as they come out of the pool to ensure there is noKenneth R Westerback
leakage from one use to the next. There is no such thing as too much paranoia. ok deraadt@.
2004-02-15new arg to disk_unbusy, to record separate read/write statistics.Ted Unangst
looked at by various, testing henning@ mcbride@ dan weeks mostly from netbsd via Pedro Martelletto <pbastos@rdc.puc-rio.br>
2004-02-07If scsi_probe_bus() is called with a particular lun, ensure that lun 0Kenneth R Westerback
information is available to make the new lun validation logic work. i.e. don't find phantom luns just because the user asks about them. Also ensure the lun value given does not exceed the maximum valid lun for a bus, rather than assuming the maximum valid lun is 7. ok tdeval@ deraadt@.
2004-01-30Backout until we have a better implementation...Thierry Deval
2004-01-29"And you definitely don't want to use p_priority. Use PRIBIO"Thierry Deval
From art@
2004-01-29Avoid an annoying freeze during attach of live "scsibus" devices.Thierry Deval
looks ok deraadt@, mickey@, krw@ and art@(but I hate it)
2004-01-25Be less verbose in sdattach() by suppressing the display of detailedKenneth R Westerback
sense information when attempting to discover the disk size. USB 6-in-1 readers have a bunch of LUNs and otherwise produce many 'Medium Not Present' details everytime they are plugged in. Noticed by grange@. Requested by and ok deraadt@.
2004-01-25Use %lu to print u_long values, not %d or %ld. Fixes display ofKenneth R Westerback
negative number of sectors for very large (i.e. RAID) disks. Noticed by Marco Peereboom. ok deraadt@.
2004-01-25Allow restriction of SCSIDEBUG output to particular scsi buses inKenneth R Westerback
addition to device targets and luns. ok deraadt@.
2004-01-24ugly #ifdef to be deleted laterTheo de Raadt
must still do TUR on mvme68k & mvme88k ssh(4) driver ok miod krw
2004-01-23Don't probe impossible luns. If lun 0 is non-existant, or if the device showsKenneth R Westerback
it doesn't grok luns then stop probing. Speeds up the probe of an empty scsi bus by approx. 30 seconds. From Marco Peereboom. Tested by Marco Peereboom, millert@, miod@, Diana Eichart, and a host of anonymous snapshot users. ok deraadt@.
2004-01-17Use SC_DEBUG() to display debug messages. Makes SCSIDEBUG output better.Kenneth R Westerback
ok tdeval@.
2004-01-16Remove this farce.Miod Vallat
2004-01-14Nuke SDEV_NOLUNS, SDEV_FORCELUNS, and PQUIRK_FORCELUNS quirks. AlsoKenneth R Westerback
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@.
2004-01-10Print sense info only for valid key; from NetBSD.Alexander Yurchenko
ok tdeval@ krw@
2004-01-08More sense message improvements from Marco Peereboom.Kenneth R Westerback
Clarify some logic and make type usage more consistant. ok tdeval@.
2004-01-07Some code cleanup and fixes inspired by NetBSD changes from mycroft@Kenneth R Westerback
and pointed out by Nate@. Fixes some <, , > displays for devices that were not filling the INQUIRY data in correctly. Silences INQUIRY commands that fail during probe. Treats SID_QUAL_LU_OFFLINE results the same as SID_QUAL_BAD_LU. Eliminate special treatment for DEC TK30 and DEC TK50 devices. ok tdeval@.
2004-01-05Don't issue PREVENT_ALLOW commands to disk devices during sdopen() orKenneth R Westerback
sdclose() unless they identified themselves as removable. ok deraadt@.
2004-01-04Rewrite scsi_decode_sense() to clean up code; eliminate many magicKenneth R Westerback
numbers; fix passing a NULL to %s under some circumstances; fix the bit index mask; etc. No change in output. ok deraadt@.
2004-01-03put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macrosMarc Espie
to built-ins, so eventually we will have one version of these files. Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes. okay millert@, drahn@, miod@.
2004-01-03Make 'unknown error category' message more informative by including errorKenneth R Westerback
number. Same change as was made to scsi_base.c a few days ago. ok deraadt@.
2004-01-02Treat all commands returning a sense data ASC of 0x29 as havingKenneth R Westerback
suffered a reset condition. Newer devices return a variety of ASCQ values now (0x00 -> 0x07) rather than just 0x00. Such commands will now be retried rather than returning EIO. Started off when Marco Peereboom's SCSI analyzer saw some ASC/ASCQ results of 0x29/0x02. ok miod@.
2004-01-02Add in missing ASC/ASCQ descriptions for non-RAMDISK (i.e.Kenneth R Westerback
non-SCSITERSE) kernels. Brings the list up to SCSI-3. From Marco Peereboom (marco at peereboom dot us). ok deraadt@.
2003-12-24Make error message more informative by showing bad value that causedKenneth R Westerback
the error to be emitted. ok miod@.
2003-11-07adress -> address, and a few more; all from Jonathon Gray;Jason McIntyre
(mvme68k/mvme88k) vs.c and (vax) if_le.c ok miod@ isakmpd ones ok ho@
2003-10-27atlas does indeed support tagging and only the siop was brokenMichael Shalayeff
2003-09-30quantum atlas iv 9 wls lies about tagsMichael Shalayeff
2003-09-26Typos: defintion -> definition, proccess -> processMiod Vallat
There are more occurences hiding in binutils, lynx and afs but I am too lazy to report them upstream at the moment.
2003-08-06Remove some double semicolons (hmm, do two semis equal a maxi?).Todd C. Miller
I've skipped the GNU stuff for now. From Patrick Latifi.
2003-07-30reverse booleans so it's clear what we're looking for. ok krw@Ted Unangst