Are USB Interrupt Out transfers periodic?
Posted: Wed Aug 03, 2022 12:55 pm
Hi all,
the title question has been plaguing me for a while now because I failed to find a satisfactory answer anywhere. Or rather, the one I find sometimes (when the topic is addressed at all) makes no sense to me.
An Interrupt Out endpoint is one with which the host interrupts the device. So it is my understanding that such a transfer is asynchronous from the host perspective. I have here next to me a USB device that possesses such an endpoint: A game controller. The Interrupt Out endpoint is used to control the force feedback feature. That is something the game may want to turn on or off at its leisure, not periodically. But the thing I keep seeing in some places is that such transfers should be periodic.
I ask because all host controllers except xHCI make a big deal out of whether a transfer is periodic or asynchronous. And as far as I could tell, the Linux driver for EHCI at least will put all Interrupt transfers on the periodic schedule (function ehci_urb_enqueue() only cares about pipe type. not direction). But that makes no sense to me. What am I missing?
Of course, SeaBIOS does the same thing, but SeaBIOS has no support for USB devices that have Interrupt Out devices (they only support Boot Keyboard, Boot Mouse, and USB MSC in a few variations, and they don't support setting the LEDs on the keyboard). Is this a pervasive error or am I missing something obvious?
the title question has been plaguing me for a while now because I failed to find a satisfactory answer anywhere. Or rather, the one I find sometimes (when the topic is addressed at all) makes no sense to me.
An Interrupt Out endpoint is one with which the host interrupts the device. So it is my understanding that such a transfer is asynchronous from the host perspective. I have here next to me a USB device that possesses such an endpoint: A game controller. The Interrupt Out endpoint is used to control the force feedback feature. That is something the game may want to turn on or off at its leisure, not periodically. But the thing I keep seeing in some places is that such transfers should be periodic.
I ask because all host controllers except xHCI make a big deal out of whether a transfer is periodic or asynchronous. And as far as I could tell, the Linux driver for EHCI at least will put all Interrupt transfers on the periodic schedule (function ehci_urb_enqueue() only cares about pipe type. not direction). But that makes no sense to me. What am I missing?
Of course, SeaBIOS does the same thing, but SeaBIOS has no support for USB devices that have Interrupt Out devices (they only support Boot Keyboard, Boot Mouse, and USB MSC in a few variations, and they don't support setting the LEDs on the keyboard). Is this a pervasive error or am I missing something obvious?