On Sat, 28 Apr 2007, Oliver Neukum wrote:

> > In other words, one user can force a device to suspend while another user 
> > is trying to access the device.  True enough.  The second user will get 
> > I/O errors.
> 
> Will he? What happens if you submit an URB for a suspended device?

Well, of course there's a race.  :-)

If the URB is submitted before the device is marked as suspended, it will
be accepted and linked into the schedule.  Then it will get low-level
protocol errors when the device fails to respond to the packets sent by
the host controller, so the URB will fail with -EPROTO or something
similar.

On the other hand (this is probably what you had in mind), if the URB is 
submitted _after_ the device is marked as suspended then usbcore won't 
accept it at all.  usb_submit_urb() returns with -EHOSTUNREACH.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to