On Mon, Jan 21, 2002 at 05:00:31PM -0700, Gordon McNutt wrote:
> I've got a situation where the callback for an urb fires which wakes up
> a user process which checks the urb status and finds that it's zero.

How does a user process check an urb status?  Are you spinning in the
callback waiting for a user process to wake up?  Is this a kernel
driver, or are you using usbfs/usbdevfs?

> But the next time the user process tries to submit the urb
> usb_submit_urb() returns -ENODEV becaus urb->dev is NULL.

You need to set urb->dev before calling usb_submit_urb() every time.

> How is a driver supposed to determine that the USB subsystem is actually
> done with an URB? I can't believe that it has to do something like poll
> urb->dev...

Ah, welcome to the mess :)

The callback function should set a flag saying that this urb is now
finished.  See the long flame^Wdiscussion on this list last week for
more details about this than you probably wanted to know.

Hope this helps,

greg k-h

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to