Page 1 of 1

Some questions about interrupts and usb

Posted: Fri Jun 14, 2019 6:19 am
by Musicteacher
Hi,

I'd like to understand interrupts a little better. The general concept is known to me (I used to hack assembler code that was executed on hsync and vsync interrupts on my old Atari ST in the late 80s ;) ), but nowadays, things seem to be more complex.

At the moment, no usb peripherals are plugged in:

Code: Select all

[ag@agantergos etc]$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:0a2b Intel Corp. 
Bus 001 Device 003: ID 056a:5157 Wacom Co., Ltd 
Bus 001 Device 002: ID 04f2:b604 Chicony Electronics Co., Ltd 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[ag@agantergos etc]$ 
Intel is my wlan, wacom is my pen/touchscreen, chicony is the webcam.

I have two (physical) usb ports on my machine. If i plug in a usb 3.0 device, it gets listed on bus 2, no matter where I plug it (port 1 or 2). If I plug in a usb 2.0 device, it gets listed on bus 1.

Is it true, that there is only one interrupt for the usb 2.0 hub, and one for the 3.0 hub?

Does this mean, that as soon as I give a higher priority to the 2.0 hub, all devices on that bus get a higher priority?

Does this also mean that the only way to separate an usb soundcard from the other devices would be to use a usb 3.0 card?

Thanks for clarification,

Andreas

Re: Some questions about interrupts and usb

Posted: Sun Jun 16, 2019 3:42 pm
by Drumfix
The short answer: Yes, you need usb 3.0 card.

The long answer:
You are using an xhci host controller. While this host controller allows up to 8 MSI interrupts, the linux host controller driver allocates only 1.
The usb 2.0 root hub you see is integrated in the xhci host controller, so it is also using this interrupt.

Re: Some questions about interrupts and usb

Posted: Sun Jun 16, 2019 7:52 pm
by Musicteacher
Thanks. But if you say the 2.0 controller is part of the 3.0 controller, the 3.0 card would not help either, right? Other stuff and the sound card would still be on the same interrupt.

Re: Some questions about interrupts and usb

Posted: Mon Jun 17, 2019 5:46 am
by Drumfix
The 3.0 card has its own host controller and interrupt. So if you connect your audio interface to a USB port of the 3.0 card and all other devices to your builtin USB ports, the soundcard has its own interrupt.

Re: Some questions about interrupts and usb

Posted: Mon Jun 17, 2019 8:56 am
by Musicteacher
Ah, that's what you mean. I meant "USB 3.0 Soundcard", you meant "external USB 3.0 controller card".

That is not an option, as I use a notebook.