On Wed, 4 Dec 2002, David Brownell wrote:

> Alan Stern wrote:
> >
> > As a variation on a theme, consider what the usb-storage driver does when
> > its disconnect() routine is called.  It does not abort the outstanding
> > urbs, at least not directly.  Instead, the disconnect() routine waits on a
> > semaphore (which is held whenever the device is busy).  Eventually,
> > either:
> >
> >     (1).  The current transaction will complete ...
> >
> > or
> >
> >     (2).  If the device has physically disconnected, the ongoing
> > transaction would never complete normally.  ...
>
> I'd expect usb-storage should always hit case (1), given that case (2)
> is the "unlink urbs" case (excluding completions due to hardware faults).

Not exactly.  Case (1) is really logical disconnect (like rmmod) and case
(2) is physical disconnect.  Of course, a sane user will avoid
disconnecting a USB cable while the drive is actively executing a command,
but then who says that all users are sane?

Alan



-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET 
comprehensive development tool, built to increase your 
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to