diff options
author | James Bottomley <James.Bottomley@SteelEye.com> | 2007-12-02 12:10:40 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-11 19:22:50 -0500 |
commit | 001aac257cf8adbe90cdcba6e07f8d12dfc8fa6b (patch) | |
tree | 0eb6294049245e05f47fdb76e3f878c78c015d88 /include/scsi/scsi_device.h | |
parent | 4a03d90e35bc5273d27301fa669d4b2103196f94 (diff) |
[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>
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r-- | include/scsi/scsi_device.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 45bb12b54175..e0c645ac5014 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -295,7 +295,7 @@ extern int scsi_mode_select(struct scsi_device *sdev, int pf, int sp, | |||
295 | struct scsi_mode_data *data, | 295 | struct scsi_mode_data *data, |
296 | struct scsi_sense_hdr *); | 296 | struct scsi_sense_hdr *); |
297 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, | 297 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, |
298 | int retries); | 298 | int retries, struct scsi_sense_hdr *sshdr); |
299 | extern int scsi_device_set_state(struct scsi_device *sdev, | 299 | extern int scsi_device_set_state(struct scsi_device *sdev, |
300 | enum scsi_device_state state); | 300 | enum scsi_device_state state); |
301 | extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, | 301 | extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, |