Re: How are USB Rx interrupts periodically polled?

From: Hans Petter Selasky <hps_at_selasky.org>
Date: Fri, 06 May 2022 09:34:54 UTC
Hi Farhan,

On 5/6/22 05:52, Farhan Khan wrote:
> So, how is the polling of an Rx interrupt done?

The software side typically queues a DMA job for the hardware. Every 
125us the hardware wakes up and sends a packet to the device asking if 
it has data or not. If it has data, the DMA job completes, and a 
callback is generated for the USB stack. Then the received data is 
placed into the receive buffer for the USB transfer.

This is is the same in OpenBSD and NetBSD, only that there they re-queue 
the USB transfer behind the scenes.

Please beware that traditional USB is all polling based. Thunderbolt on 
the other side is different, and also the security aspects are different.

--HPS