[SCSI] sd,sr: add early detection of medium not present
authorJames Bottomley <James.Bottomley@SteelEye.com>
Sun, 2 Dec 2007 17:10:40 +0000 (19:10 +0200)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 12 Jan 2008 00:22:50 +0000 (18:22 -0600)
commit001aac257cf8adbe90cdcba6e07f8d12dfc8fa6b
tree0eb6294049245e05f47fdb76e3f878c78c015d88
parent4a03d90e35bc5273d27301fa669d4b2103196f94
[SCSI] sd,sr: add early detection of medium not present

The current scsi_test_unit_ready() is updated to return sense code
information (in struct scsi_sense_hdr).  The sd and sr drivers are
changed to interpret the sense code return asc 0x3a as no media and
adjust the device status accordingly.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/scsi_ioctl.c
drivers/scsi/scsi_lib.c
drivers/scsi/sd.c
drivers/scsi/sr.c
include/scsi/scsi_device.h