On Tue, 3 Dec 2002, David Brownell wrote:

>> a driver is supposed to abort URBs after a device is disconnected?
>
>It's supposed to do that in disconnect(), yes, for any
>urbs that haven't yet completed.  In what way would it
>be possible to achieve #1 without #2 ??

I was under the impression that the HCD would notice (during the next 
frame) that those TDs (or EDs) have a target device that's no longer 
connected, and finish them with an error.  If not, then how can the 
host controller execute that TD/ED?  The device isn't there...

But if the driver does need to remove its URBs from the HCD, then 
you're right - disconnect() should be all that's needed (AFAIK) except 
for device state.

>You (and Oliver) seem to be assuming that disconnect() is
>about hardware.  It's not.  It's about driver unbinding.
>The unbinding does happen when hardware goes away, but
>it also happens at other times (driver rmmod, etc).

yep.  Remember way back when I suggested, instead of a forcible 
disconnect, a driver ioctl (that had to be implemented by all drivers) 
to disconnect 'nicely'?  That would have let the driver finish 
whatever it was doing and fixup the device state...ah well...

>> I thought those URBs would be completed with error (ENODEV or ECONNRESET).
>
>That's what happens when the driver unlinks them (synchronously or
>asynchronously, respectively).

well ('cept for device state) we're cool then, eh? ;)

>The reason _why_ a driver releases an interface doesn't
>change the semantics of releasing it.  Releasing involves
>your point #1 (which implies #2).

It just seems strange to me to be aborting URBs for a device that no 
longer exists...seems like the HCD would just clean them out during 
the next frame.  Especially since it would be easier (more 
centralized) to do it in the HCD, while doing it in the drivers is 
more work...


-- 
Dan Streetman
[EMAIL PROTECTED]
--------------------------------------------------
186,282 miles per second:
It isn't just a good idea, it's the law!


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