0
votes

What I know:

  • USB Device (Mouse) has an Interrupt IN Endpoint where outgoing data to host ist stored.
  • Host polls this Interrupt IN Endpoint and writes the data to a buffer.

Where can I find this buffer? I tried very hard to find it in the Technical Manual of my motherboard (USB...Controller ... Buffer) but I could not find this register.

So is the HostController using its own buffer for storing the Endpoint IN data from the device or is the Host Conroller Mapping it to other registers?

And if there is an action, (eg mouse movement or click), does the USB Host Controller cause an interrupt? Where can I find this stored/buffered data?

I am working with ubuntu and by looking into /proc/interrupts I can find the EHCI_HCD:USB2 Controller with IRQ Number of connected USB Device (mouse) ...

Maybe anyone can help me with understanding this usb Enpoint => HostController => Interrupt --- Mechanism.

Thank you so much!

1

1 Answers

0
votes

Where can I find this buffer? I tried very hard to find it in the Technical Manual of my motherboard (USB...Controller ... Buffer) but I could not find this register.

This buffer comes from HID class driver in the form of URB. So its a software buffer.

So is the HostController using its own buffer for storing the Endpoint IN data from the device or is the Host Conroller Mapping it to other registers?

As I said earlier, there is no register in the host controller to store the data. Host controller uses the software buffer passed by the HCD.

And if there is an action, (eg mouse movement or click), does the USB Host Controller cause an interrupt? Where can I find this stored/buffered data?

No. There will not be any interrupt. You will be polling the Interrupt endpoint to get the status. Interrupts are used by the host controller to notify the completion of a transfer which is Interrupt IN transfer in your case.

To make it clear, please see the below diagram of the Transfer Descriptor. The host controller uses the "Buffer pointer" to store or retrieve data in case of IN and OUT transaction respectively. To know more about Transfer Descriptor please read EHCI specification.

enter image description here