From 38582a62ecd337de4212004c7d4844899dc57890 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Wed, 6 Feb 2008 13:01:58 -0600 Subject: [SCSI] sr: fix test unit ready responses Commit 210ba1d1724f5c4ed87a2ab1a21ca861a915f734 updated sr.c to use the scsi_test_unit_ready() function. Unfortunately, this has the wrong characteristic of eating NOT_READY returns which sr.c relies on for tray status. Fix by rolling an internal sr_test_unit_ready() that doesn't do this. Tested-by: Daniel Drake Signed-off-by: James Bottomley --- drivers/scsi/sr_ioctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/scsi/sr_ioctl.c') diff --git a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c index d5cebff1d646..ae87d08df588 100644 --- a/drivers/scsi/sr_ioctl.c +++ b/drivers/scsi/sr_ioctl.c @@ -306,8 +306,7 @@ int sr_drive_status(struct cdrom_device_info *cdi, int slot) /* we have no changer support */ return -EINVAL; } - if (0 == scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, - &sshdr)) + if (0 == sr_test_unit_ready(cd->device, &sshdr)) return CDS_DISC_OK; if (!cdrom_get_media_event(cdi, &med)) { -- cgit