On Thu, 20 Mar 2003, Oliver Neukum wrote:

> Am Donnerstag, 20. März 2003 22:01 schrieb Matthew Dharm:
> > In my experience, resetting is rare.  If you do need it, it's probably
> > because the device isn't compliant and wasn't going to work anyway.
> >
> > So, why don't we just move the reset into the core, and then every driver
> > (including usb-storage) can get reset all at once?  That sidesteps the
> > issue, I think.
> 
> I am afraid that the core can't do it either because the driver/core
> interface lacks the necessary primitives.
> 
> Doing a disconnect/probe cycle is the wrong way, because
> 
> A the device doesn't go away, most drivers have the same problem as storage
> B it allocates memory (due to device removal notification) in the error handler
> 
> We can do it, but it means introducing new primitives.

In the absence of far-reaching changes to the API, my suggestion is to
have the emulated SCSI bus reset code in usb-storage do nothing but log an
error message and return an error code.  For the time being, considering
how infrequently these resets occur, we can simply rely on the user
unplugging the USB cable and putting it back in or cycling the power to
the drive.  (Yes, there are situations where these resets crop up
regularly -- but they are the result of some other incompatibility that a
device reset won't fix anyway.)

In the long term, as Oliver says, we will need to add a driver/core API
primitive to support device resets.

Alan Stern



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to