OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:38 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Are USB Interrupt Out transfers periodic?
PostPosted: Wed Aug 03, 2022 12:55 pm 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 1593
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?

_________________
Carpe diem!


Top
 Profile  
 
 Post subject: Re: Are USB Interrupt Out transfers periodic?
PostPosted: Fri Aug 05, 2022 7:31 pm 
Offline
Member
Member

Joined: Tue Apr 03, 2018 2:44 am
Posts: 401
nullplan wrote:
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.
...
Is this a pervasive error or am I missing something obvious?


I think it's more about scheduling than functionality. A normal bulk transfer is scheduled after isochronous and interrupt transfers.

So, in the case of your force feedback device, you want to do the force feedback in sync with the game play, and not be at the whims of bulk scheduling (you might be competing with large bulk block transfers, for example) giving you unpredictable latency.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Amazonbot [bot], Google [Bot] and 52 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group