On Thu, Dec 27, 2001 at 09:31:24AM -0500, [EMAIL PROTECTED] wrote: > The driver I'm writing requires me to periodically send a stream of > control messages to the device. (Multiple packets asking for different > types of status - a heartbeat per se.) The event that drives the sending > of this stream is a kernel timer. I can't use usb_control_msg 'cause it > can't be called from an interrupt context. So, I'm currently using > usb_submit_urb. However, many of my submits fail with ENXIO 'cause > there's already an URB happening on the control pipe. Is there a way to > queue CTRL URBs like already happens for BULK URBs? If not, anybody have > any suggestions on the best way to handle this?
See the catc.c driver for an example. Or the hid driver. You can manage the queue yourself, and always sumbit the next control message in the completion routine of the previous. > Another point ... I tried implementing a solution whereby I don't send a > new CTRL URB until I get the callback for the last one. However, I would > occassionally get ENXIO errors about there already being an URB, even > though the "burb" reported in the ENXIO was the urb that just finished. > Anybody know of a timing issue with removing CTRL URBs? This looks like you have a race somewhere in your code. -- Vojtech Pavlik SuSE Labs _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
