aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/sr.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-06-30 10:16:50 +1000
committerPaul Mackerras <paulus@samba.org>2008-06-30 10:16:50 +1000
commite9a4b6a3f6592862a67837e80aad3f50468857a6 (patch)
tree087420cf91ac922c7e99757c4490a605ec7b10f2 /drivers/scsi/sr.c
parent441dbb500b4344a8e3125e5aabab4f9dbf72514f (diff)
parent1702b52092e9a6d05398d3f9581ddc050ef00d06 (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r--drivers/scsi/sr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 7ee86d4a761..c82df8bd4d8 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -178,6 +178,9 @@ int sr_test_unit_ready(struct scsi_device *sdev, struct scsi_sense_hdr *sshdr)
the_result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL,
0, sshdr, SR_TIMEOUT,
retries--);
+ if (scsi_sense_valid(sshdr) &&
+ sshdr->sense_key == UNIT_ATTENTION)
+ sdev->changed = 1;
} while (retries > 0 &&
(!scsi_status_is_good(the_result) ||