Re: [linux-usb-devel] Re: [BK PATCH] USB changes for 2.4.21-pre6

2003-04-01 Thread Alan Stern
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.0 -0600
 +++ transport.c   2003-03-31 17:03:51.0 -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


Re: [linux-usb-devel] Re: [BK PATCH] USB changes for 2.4.21-pre6

2003-04-01 Thread John Goerzen
On Tue, Apr 01, 2003 at 09:50:54AM -0500, Alan Stern wrote:
  +   us-transport_reset(us);
  srb-result = DID_ABORT  16;
  return;
  }
 
 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).

The interesting thing is that in 2.5.x this same condition does trigger a
reset, and the device then works.  There seems to be some difference in
definition of abort between 2.4.x and 2.5.x, though.

 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.

I will try this evening and let you know.

-- John


---
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


[linux-usb-devel] Re: [BK PATCH] USB changes for 2.4.21-pre6

2003-04-01 Thread John Goerzen
Alan Stern [EMAIL PROTECTED] writes:

 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.

Indeed it does!  Things seem to work fine with your patch.

 --- linux-2.4.21/drivers/scsi/sd.c.orig   Mon Mar 31 16:27:31 2003
 +++ linux-2.4.21/drivers/scsi/sd.cMon 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



---
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


Re: [linux-usb-devel] Re: [BK PATCH] USB changes for 2.4.21-pre6

2003-03-31 Thread Greg KH
On Sat, Mar 29, 2003 at 11:21:52AM -0600, John Goerzen wrote:
 
 However, I notice that I still am having trouble mouting my memory
 stick from a Clie NX-70V.  In case you're not aware, that PDA has a
 USB interface and an application that lets an inserted memory stick
 appear as a USB storage device, similar to a memory stick reader.

Mind entering this info into a bug report at bugzilla.kernel.org?  Then
I can assign it to the usb-storage author and maintainer :)

thanks,

greg k-h


---
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


Re: [linux-usb-devel] Re: [BK PATCH] USB changes for 2.4.21-pre6

2003-03-31 Thread John Goerzen
On Mon, Mar 31, 2003 at 09:28:46AM -0800, Greg KH wrote:
 On Sat, Mar 29, 2003 at 11:21:52AM -0600, John Goerzen wrote:
 Mind entering this info into a bug report at bugzilla.kernel.org?  Then
 I can assign it to the usb-storage author and maintainer :)

I have submitted bug #526 with this info.  Also, you might note I tried
adding new lines to unusual_devs.h using the info from an earlier Clie
model, but this did not help.

Unfortunately, with 2.5.x, I can't see any USB devices at all on this
machine, so I'm stuck troubleshooting with 2.4.x.  2.5.x won't even boot on
my x86, so I'm really stuck  with 2.4.x :-)  However, please note that I
have used your backported patches.

Thanks,
John Goerzen


---
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


[linux-usb-devel] Re: [BK PATCH] USB changes for 2.4.21-pre6

2003-03-31 Thread John Goerzen
Greg KH [EMAIL PROTECTED] writes:

 Mind entering this info into a bug report at bugzilla.kernel.org?  Then
 I can assign it to the usb-storage author and maintainer :)

Interestingly, I have finally coerced 2.5.66 to boot and I can report
that I *can* access this device on 2.5 with no problem.  Therefore,
there seems to be some non-backported fix for 2.4.  I looked and did
not see any entry in unusual_devs.h in 2.5 for this device, though, so
I'm at a loss as to where that change may be (note that I'm not a USB
hacker by any means).

-- John



---
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


Re: [linux-usb-devel] Re: [BK PATCH] USB changes for 2.4.21-pre6

2003-03-31 Thread John Goerzen
On Mon, Mar 31, 2003 at 09:28:46AM -0800, Greg KH wrote:
  However, I notice that I still am having trouble mouting my memory
  stick from a Clie NX-70V.  In case you're not aware, that PDA has a
  USB interface and an application that lets an inserted memory stick
  appear as a USB storage device, similar to a memory stick reader.
 
 Mind entering this info into a bug report at bugzilla.kernel.org?  Then
 I can assign it to the usb-storage author and maintainer :)

Ah ha.  Will do.  I went to the SourceForge page for the USB project
intending to submit a bug there, but there was no bug spot for that project,
so I guess I gave up too soon.

-- John


---
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


[linux-usb-devel] Re: [BK PATCH] USB changes for 2.4.21-pre6

2003-03-31 Thread John Goerzen
Greg KH [EMAIL PROTECTED] writes:

 On Sat, Mar 29, 2003 at 11:21:52AM -0600, John Goerzen wrote:
 Mind entering this info into a bug report at bugzilla.kernel.org?  Then
 I can assign it to the usb-storage author and maintainer :)

Is there any other appropriate place for this given that this is a
2.4.x bug?



---
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


[linux-usb-devel] Re: [BK PATCH] USB changes for 2.4.21-pre6

2003-03-31 Thread John Goerzen
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.0 -0600
+++ transport.c 2003-03-31 17:03:51.0 -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.


---
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