Hi,
Currently only control endpoints have a synchronous API to do requests of any
size. You can pass NULL for mutex, which basically means no mutex will be
dropped during sleeping periods.
BULK/INTERRUPT/ISOCHRONOUS are all asynchronous. However, in user-space,
libusb provides synchronous functions to read and write data.
> I have a device that that does the equivalent of control transfers over
> an interrupt pipe.
> So I need to send data, get status, send more data, get status again,
> and then finally start
> retrieving data; all using interrupt transfers. Been going over the
> drivers in the kernel
> and they are all looking to be doing async or synchronous back through
> user mode.
Probably we could make some convenience wrappers to do synchronous transfers
in the kernel. Else you need to make your own condition variable and sleep on
that until the USB transfer completes or fails.
If you think that a synchronous API for USB in the kernel is generally useful,
send me a patch and I'll commit it. Most drivers only use synchronous control
transfers.
--HPS