patch-2.1.100 linux/drivers/scsi/sd.c
Next file: linux/drivers/scsi/sd_ioctl.c
Previous file: linux/drivers/scsi/scsi_syms.c
Back to the patch index
Back to the overall index
- Lines: 17
- Date:
Fri May 1 11:19:58 1998
- Orig file:
v2.1.99/linux/drivers/scsi/sd.c
- Orig date:
Fri Apr 10 13:03:49 1998
diff -u --recursive --new-file v2.1.99/linux/drivers/scsi/sd.c linux/drivers/scsi/sd.c
@@ -1060,8 +1060,15 @@
}
inode.i_rdev = full_dev; /* This is all we really need here */
- retval = sd_ioctl(&inode, NULL, SCSI_IOCTL_TEST_UNIT_READY, 0);
+ /* Using Start/Stop enables differentiation between drive with
+ * no cartridge loaded - NOT READY, drive with changed cartridge -
+ * UNIT ATTENTION, or with same cartridge - GOOD STATUS.
+ * This also handles drives that auto spin down. eg iomega jaz 1GB
+ * as this will spin up the drive.
+ */
+ retval = sd_ioctl(&inode, NULL, SCSI_IOCTL_START_UNIT, 0);
+
if(retval){ /* Unable to test, unit probably not ready. This usually
* means there is no disc in the drive. Mark as changed,
* and we will figure it out later once the drive is
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov