From 210ba1d1724f5c4ed87a2ab1a21ca861a915f734 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sat, 5 Jan 2008 10:39:51 -0600 Subject: [SCSI] sr: update to follow tray status correctly Based on an original patch from: David Martin When trying to get the drive status via ioctl CDROM_DRIVE_STATUS, with no disk it gives CDS_TRAY_OPEN even if the tray is closed. ioctl works as expected with ide-cd driver. Gentoo bug report: http://bugs.gentoo.org/show_bug.cgi?id=196879 Cc: Maarten Bressers Signed-off-by: James Bottomley --- drivers/scsi/sr.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/scsi/sr.h') diff --git a/drivers/scsi/sr.h b/drivers/scsi/sr.h index 0d04e2878c9d..81fbc0b78a52 100644 --- a/drivers/scsi/sr.h +++ b/drivers/scsi/sr.h @@ -20,6 +20,9 @@ #include #include +#define MAX_RETRIES 3 +#define SR_TIMEOUT (30 * HZ) + struct scsi_device; /* The CDROM is fairly slow, so we need a little extra time */ -- cgit v1.2.3