Some patches pending for 2.5.45 let you do this very easily, on all the mainstream host controller drivers. You shouldn't need to either loop or do a long busy-wait, or start caring about hcd-specific behavior nuances. ...
Sounds very good. Thanks. But what should I do in the meantime? Call schedule_timeout() and do a mdelay() until 16ms are over?
If you can pad out packets with something innocuous like zeroes, as I saw recommended with some other operating system recently, then 2.4 should let you do this easily. Your completion routine (for each interrupt-out transfer) should be able to go like:
if (0 bytes left) unlink this urb record timestamp else if (1..maxpacket bytes left) copy partial packet into urb's buffer zero pad to make it a full packet else copy full packet into urb's buffer and then implicitly resubmit. The timestamp is so that the next time you need to send data you can schedule_timeout(), or set a timer (not mdelay!), so you don't send the message too soon. That's probably about the cleanest you'll get for now, I think those "unlink in completion" bugs got fixed in all 2.4 HCDs, but I'd still encourage you to test carefully. - Dave ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel