On Sat, 4 Dec 2004, David Brownell wrote:

> > Concerning the lack of resets...  I don't fully understand the philosophy
> > used by the SCSI layer in its approach to error correction.  
> 
> Me either.  I suspect part of it avoiding a "bus" reset in
> expectation that for "real SCSI" there will be multiple
> devices on the bus ... which for USB is typically not a valid
> assumption.

Right.  There also may be an assumption about some types of errors being 
caused by a bus failure preventing communication with the device 
(in which case trying to reset the device would be futile), as opposed to 
the device itself reporting that something went wrong.  You'd think that 
they would still resort to a bus reset in this case, however.

> > In fact, I suggested skipping the class-specific reset entirely and 
> > proceeding directly to the port reset, because that's what Windows does.
> 
> Why does this not surprise me?  :)

I'm guessing that a large part of the reason Windows doesn't use
class-specific resets is because they are so often unsuccessful.  ISTR Mac
OS-X does use them, however.

> > I suspect the best approach might end up being to reduce the 
> > class-specific timeout and to automatically do a port reset whenever the 
> > class-specific reset fails.
> 
> In fact that's what I started to look at.  In this case the
> class-specific request failed almost immediately with -EPROTO,
> so that would be a good indicator that if there's only one LUN,
> and one interface, usb_reset_device() might be worth trying.

Yes -- certain error codes will provide a very strong hint that a port
reset is called for.  The existence of only one LUN is unimportant, since
any reset (even a class-specific reset) will affect the entire device.  
And the driver already contains a test to avoid port resets if the device
has more than one interface.

Alan Stern



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to