On Mon, 31 Mar 2003, John Goerzen wrote: > Matthew Dharm <[EMAIL PROTECTED]> writes: > > > Can you use 'dd' to read data from the device? > > No, it gives an I/O error as well. > > However, I have good news. The following simple patch fixes it for > me: > > --- transport.c~ 2003-03-29 10:00:48.000000000 -0600 > +++ transport.c 2003-03-31 17:03:51.000000000 -0600 > @@ -631,6 +631,7 @@ > */ > if (result == USB_STOR_TRANSPORT_ABORTED) { > US_DEBUGP("-- transport indicates command was aborted\n"); > + us->transport_reset(us); > srb->result = DID_ABORT << 16; > return; > } > > Now, this may well totally ruin things for everyone else. I have no > other USB storage devices to test, so for me, it's very nice :-) > > I stumbled across this after noticing the 2.5.x resets when > it gets an error, but 2.4.x does not.
You shouldn't use that patch; it's not correct. The driver isn't supposed to reset the device after an abort, only after an error (and an abort doesn't count as an error). Based on the kernel log you posted earlier, it looks like your problem may stem from the use of a START-STOP command. The patch below removes that command; it's a backport from 2.5. Try installing this and let us know if it helps. Alan Stern --- linux-2.4.21/drivers/scsi/sd.c.orig Mon Mar 31 16:27:31 2003 +++ linux-2.4.21/drivers/scsi/sd.c Mon Mar 31 16:56:20 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 ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel