On Wed, 16 Nov 2005, Duncan Sands wrote:

> I think it's safe to assume that if a USB device is disconnected and 
> reconnected
> then the old USB device will have called shutdown_atm_dev (this is called in 
> the
> disconnect method) before the new USB device creates an ATM device (this is 
> done
> in the probe method or later).  But I'm not sure.  It might not be true if 
> someone
> managed to unplug from one port and plug into another in less than 200 
> milliseconds.
> It also might not be true I suppose if the device was disconnected by the hub 
> due
> to some kind of electrical problem, and reassigned by the hub to a different 
> port
> (I don't know if any hubs play this kind of trick).  I guess that any kind of
> disconnect/reconnect on the same USB port, real or logical, will see the old 
> device
> disconnected before the new device is probed.  Maybe some of the USB guys can
> confirm this.

It is true that disconnect on a port will always complete before a
reconnect on that same port begins.  It will also complete before
reconnect on another port, although here you're getting into a murky area.  
For instance, what if someone has two of these USB ATM devices and plugs
the second one in just before disconnecting the first?

A driver should be robust enough to work in any situation, regardless of
the order of disconnect and probe calls.  The only reason for possible 
problems would be if the driver had a notion of "device identity" -- that 
is, it could tell if two different instances actually were the same 
device.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to