summaryrefslogtreecommitdiff
path: root/sys/scsi
AgeCommit message (Collapse)Author
2005-10-04shorter name for wait channelTheo de Raadt
2005-09-29fix the check for the type of enclosureDavid Gwynne
2005-09-29Clear SDEV_MEDIA_LOADED for cd media on the last close of a device, asKenneth R Westerback
sd does. Prevents spurious label information from being seen on devices that return NOT READY/UNABLE TO RECOVER TABLE-OF-CONTENTS error (or other sense errors) for blank media. Burning cd's still works. ok marco@ dlg@ fgsch@ deraadt@
2005-09-26Use SCSI_IGNORE_ILLEGAL_REQUEST when reading a cd's table of contents.Kenneth R Westerback
ILLEGAL REQUEST is correctly reported for blank media, as an informative FreeBSD comment pointed out. Ensure the returned table of contents is always initialized to zero. Call readdisklabel with spoofonly = 1 when no data tracks are found. Don't try to read the DOS label from the device if spoofonly is 1. Only done for amd64 here. More archs to follow. Eliminates scsi error messages when attempting to open a cd containing blank media, as pointed out by Michael Coulter. ok deraadt@
2005-09-21Improve readability by using a variable instead of repeatedKenneth R Westerback
calculations. Same as sd.c r1.94.
2005-09-21Missing parenthesis. Same problem was addressed in sd.c r1.90. CouldKenneth R Westerback
fix devices not supporting TEST UNIT READY.
2005-09-19Use variable to eliminate repeated calculation. More readable. NoKenneth R Westerback
functional change. ok dlg@
2005-09-15Don't fake MODE SENSE page 4 info inside raid drivers, just let sdKenneth R Westerback
fake a geometry. Page 4 info does not get used for size information. Eliminate now unused union scsi_disk_pages. ok marco@ mickey@ pre-lock.
2005-09-11Simplify code by changing struct scsi_mode_sense_buf{ union {}Kenneth R Westerback
headers; } to just union scsi_mode_sense_buf {}. No functional change. ok marco@
2005-09-11Some UMASS devices blow up if MODE SENSE buffer length is 0 (aka 256).Kenneth R Westerback
Some blow up if buffer length is not 0. Just fake geometry for all UMASS devices since it's almost always fictitious anyway. One step on the road to eliminate geometry entirely. Fixes Ed Wandasiewicz's 2nd gen iPod mini and Sebastiaan Indesteege's UBest Technology device. ok marco@
2005-09-08free(NULL, ...) is not safe in the kernel. So check for NULL'nessKenneth R Westerback
before free()'ing buf in sd_get_parms(). Tweak code so there is only one free(buf, ...) to worry about. ok deraadt@.
2005-08-29If a buffer larger than the max allowed is offered to scsi_mode_sense()Kenneth R Westerback
or scsi_mode_sense_big(), use as much of it as is allowed. Don't justi mask off the higher bits and possibly leave yourself with 0 space. Fixes problem aoyama@ found on luna88k tape drive. ok deraadt@.
2005-08-29Make sure certain architectures/compilers don't round up the size ofKenneth R Westerback
struct scsi_mode_sense_buf to 256, a value which doesn't fit in the 1 byte length field of a scsi command. Found by aoyama@ on luna88k. Suggested by miod@. ok deraadt@.
2005-08-27Put in missing parenthesis and thus always passKenneth R Westerback
SCSI_IGNORE_ILLEGAL_REQUEST and SCSI_IGNORE_MEDIA_CHANGE flags to scsi_test_unit_ready() and scsi_start() during sdopen(). Re-enables use of devices that don't support START_STOP or TEST_UNIT_READY commands. Noted by and fix tested by Jason Crawford on VMWare disks. ok dlg@ henning@, supportive comments from miod@.
2005-08-24dont reject safte devices that have more inquiry information than theDavid Gwynne
space we want to store it in. thanks to mtu for providing access to hardware for this. ok deraadt@
2005-08-24Test xs->bp before de-referencing it. Initialize it to NULL, not 0.Kenneth R Westerback
ok deraadt@
2005-08-23setting the FAULT flag on a device so the alarm led blinks may haveDavid Gwynne
unwanted side effects, eg, disabling both fc ports and powering the disk down. so remove this knob for now. ok deraadt@
2005-08-23Move uses of struct scsi_mode_sense_buf (255 bytes each) from theKenneth R Westerback
stack into malloc'd memory. ok deraadt@
2005-08-23Spin up sd units even if TEST_UNIT_READY says they're ready.Kenneth R Westerback
Use consistant scsi_autoconf and SCSI_SILENT flags in scsi_test_unit()/scsi_start() pairs. Fixes some hppa, vax, sparc systems that do not spin up disks automatically. Keeps USB card readers and such reasonably quiet. Noted by millert@ (hppa), henning@ (sparc) and hshoexer@ (vax). ok deraadt@
2005-08-23Test for cold and apply relevant flags for all scsi commands.Marco Peereboom
ok dlg@ krw@ deraadt@
2005-08-22check for scsi_autoconf state, spotted by marco; ok krwTheo de Raadt
2005-08-22spell: failture->failureDavid Krause
2005-08-21handle the unblink request; ok dlg marco krwTheo de Raadt
2005-08-21Some devices go berserk when asked for mode sense pages they don'tKenneth R Westerback
have. Some devices return four bytes less information than requested for the PAGE_RIGID_GEOMETRY page. Put the two together and older Conner drives don't work because we rejected the short page and asked for the PAGE_FLEX_GEOMETY page. Noted by hshoexer@ and kettenis@. Also should fix the problems with a device miod@ reported that did a similar short PAGE_FLEX_GEOMETRY. ok deraadt@
2005-08-18Only allow blocksizes that are powers of 2 between 512 and 64K. An sdKenneth R Westerback
device that returns any other value via READ CAPACITY or MODE SENSE will be marked 'drive offline'. Prevents divide by zero when calculating disk size in MB, amoung other interesting possibilities. ok mickey@ dlg@ deraadt@ millert@ marco@
2005-08-18Silly dlg did not read my old code careful enough. Missed 2 bits that areMarco Peereboom
necessary for the blinkenlight magic. Also removed some XXX cruft that was misleading.
2005-08-18infrastructure to support blinking controlled via /dev/bio ioctls. theDavid Gwynne
code to do the actual blink is ifdefed out till marco can figure out what im doing wrong.
2005-08-18das blinkenlighten! uses /dev/bio to allow an ioctl to turn identify onDavid Gwynne
for a particular target
2005-08-17add a macro for the WRITE_BUFFER opcodeDavid Gwynne
ok marco@ krw@
2005-08-17Use defines for disk mode page codes. Check returned mode pages toKenneth R Westerback
ensure they are the ones requested. No functional change unless garbage was being returned. ok marco@
2005-08-17dont increment the offset both in and out of the loop while reading theDavid Gwynne
config ok deraadt@ marco@
2005-08-15free the right buffer on errorDavid Gwynne
ok deraadt@
2005-08-13Use scsi_do_mode_sense(). Testing on beck@'s new LTO changer.Kenneth R Westerback
ok tdeval@ deraadt@
2005-08-13let safte match on dell enclosures too. ses takes precedence thoughDavid Gwynne
ok marco@ deraadt@
2005-08-12rewrite the reading of the status page, which in turn adds support forDavid Gwynne
monitoring the fans, powersupplies, doorlock, and alarm as well the temps. ok deraadt@ marco@
2005-08-12Move disk mode page structure declarations out of scsi_disk_pagesKenneth R Westerback
union declaration to allow pointers to individual page types. Simplify sd.c code by using individual page type pointers. No functional change. ok tdeval@
2005-08-11typosDavid Gwynne
2005-08-10use the appropriate flags to scsi_scsi_cmd during autoconf so we dont spinDavid Gwynne
forever on mp kernels problem reported by matthieu baptiste
2005-08-09Add Vital Product Data structure. Requested deraadt@ ok dlg@Marco Peereboom
2005-08-09normalise the fan speed outputDavid Gwynne
ok marco@
2005-08-08Fill in device structure, bad dlg@Marco Peereboom
2005-08-08Fill in device structure, bad dlg@Marco Peereboom
2005-08-05report the fan speed as a percentage since it seems all the enclosures weDavid Gwynne
fill in the rpm fields. your call deraadt@
2005-08-05dont do an inquiry in attach just to print the safte revision number. itDavid Gwynne
is window dressing. zap it deraadt@
2005-08-05switch safte from using a scsi cmd at softclock to doing the commandsDavid Gwynne
in a kernel thread. very similair to the same change in ses.c. ok marco@ beck@ deraadt@
2005-08-05reorder the allocation of bits in attach to make cleaning up on an errorDavid Gwynne
shorter and less prone to mistakes ok marco@
2005-08-05READ BUFFER is a generic opcode, so dont define our ownDavid Gwynne
2005-08-05a define for the scsi READ BUFFER opcodeDavid Gwynne
for and ok marco@
2005-08-05shorten dmesg outputTheo de Raadt
2005-08-05scsi_safte.c and scsi_safte.h are now known as safte.c and safte.hDavid Gwynne
respectively ok krw@ deraadt@ marco@