summaryrefslogtreecommitdiff
path: root/sys/scsi
AgeCommit message (Collapse)Author
2005-04-06Remove ses crud.Marco Peereboom
Requested and ok mickey@
2005-04-06Move ses crud into its own file.Marco Peereboom
Requested mickey@
2005-04-06Add status/receive ses structures and #defines.Marco Peereboom
2005-04-06De-register scsi.Kenneth R Westerback
2005-04-06Add control/send structures.Marco Peereboom
ok krw@
2005-04-06Remove obsolete file.Kenneth R Westerback
ok deraadt@ tdeval@ henning@ marco@
2005-04-06Add RECEIVE_DIAGNOSTIC & SEND_DIAGNOSTIC #defines for SES.Marco Peereboom
2005-04-05Factor out scsi_mode_sense() and scsi_mode_select() like NetBSD does.Kenneth R Westerback
Eliminate some duplicate structures and defines along the way. SCSI CD drives will now pay attention to the 'flags' parameter for MODE SENSE and MODE SELECT commands. No other functional change. ok tdeval@
2005-04-05Clean up some logic. Use better error handling for sd devices. BeKenneth R Westerback
quiet if raw partition access tried. Be more careful with SDEV_MEDIA_LOADED. Inspired by some NetBSD changes. ok marco@
2005-04-01Cleanup SKEY_NOT_READY logic. Only retry command if it's likely theKenneth R Westerback
condition is going to clear up, which speeds up boot by avoiding delays in disk matching. Return ENODEV if media is not present, which avoids trying to spin up disks that are not present. Use ENODEV in amd64/i386 dkcsum.c to filter failure reports. Mostly from NetBSD. ok marco@
2005-03-30Comment typo, minor knf. No code change.Kenneth R Westerback
2005-03-25Since START_STOP is an optional command that a device need notKenneth R Westerback
support, don't penalize devices that don't support it. May help some usb devices. ok marco@
2005-03-24If READ CAPACITY(10) says there are more than 0xffffffff sectors,Kenneth R Westerback
report 0xffffffff and print a message. READ CAPACITY(16) is needed to get the actual size in this case. ok tdeval@ (a while ago) marco@
2005-03-08Cosmetics...Thierry Deval
Mainly remove space between locators parens, replace spaces with tabs where appropriate and consistently align dependencies.
2005-02-27If test_unit_ready() in sdattach() returns EIO, try to spin up unitKenneth R Westerback
exactly as is done in sdopen(). This improves the chances of getting valid geometry/size and avoiding 'drive offline' errors, without subjecting the device to anything it won't see anyway. No impact on devices that already work. Fixes problem with Jim Rees' Hitachi DK23DA in an Archos Multimedia Jukebox. Without adding quirks! Tested by Jim Rees. ok marco@.
2004-12-28correct snprintf return val mishandling; ok krw marcoTheo de Raadt
2004-12-26Use list and queue macros where applicable to make the code easier to read;Miod Vallat
no change in compiler assembly output.
2004-12-18Add SPI status information unit structure and defines, along with someKenneth R Westerback
command information unit 'Task Management Flags' defines. From FreeBSD with a few tweaks. For ahd. ok tdeval@ marco@.
2004-11-30No longer require write permission for read-only SCSI commandsKenneth R Westerback
submitted via ioctl. Eliminate scsi_do_safeioctl(), thus permitting ch, ss and st devices to submit SCSI commands. Return EPERM rather than EBADF when permissions are inadequate. Allows more programs to run with fewer permissions. Problem diagnosed by Nikolay Sturm in mplayer port. Tested by Nikolay, ok deraadt@.
2004-10-17Add some FreeBSD MSG_EXT_PPR_* defines. Will be used in (at least) ahdKenneth R Westerback
to eliminate some magic numbers. ok marco@
2004-10-16Fix 'Tape block size (32754) not a multiple of dump block sizeKenneth R Westerback
(1024).' errors in restore(1). Check for SDEV_OPEN in sc_link->flags (where it lives) rather than sense->flags (where it doesn't). Problem noted by John Danks on misc@ and reinforced by Otto & Hugh. ok marco@ hugh@.
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@.