ChangeSet 1.1101.3.7, 2003/04/09 17:00:50-07:00, stern@rowland.harvard.edu [PATCH] USB: usb-storage START-STOP under Linux 2.4 This patch for 2.4.21-pre6 (a backport from 2.5) removes a source of problems for many usb-storage devices by replacing a START-STOP command, used to determine if the drive media is loaded, with a TEST-UNIT-READY. In the past people have handled this by creating entries in unusual_devs.h with the US_FL_START_STOP flag; now that should no longer be necessary. drivers/scsi/sd.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff -Nru a/drivers/scsi/sd.c b/drivers/scsi/sd.c --- a/drivers/scsi/sd.c Fri Apr 18 15:00:58 2003 +++ b/drivers/scsi/sd.c Fri Apr 18 15:00:58 2003 @@ -731,15 +731,17 @@ * check_disk_change */ } - /* Using Start/Stop enables differentiation between drive with + /* + * Using TEST_UNIT_READY 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. + * + * Drives that auto spin down. eg iomega jaz 1G, will be started + * by sd_init_onedisk(), whenever revalidate_scsidisk() is called. */ retval = -ENODEV; if (scsi_block_when_processing_errors(SDev)) - retval = scsi_ioctl(SDev, SCSI_IOCTL_START_UNIT, NULL); + retval = scsi_ioctl(SDev, SCSI_IOCTL_TEST_UNIT_READY, NULL); if (retval) { /* Unable to test, unit probably not ready. * This usually means there is no disc in the