Re: Poor USB performance on ASUS 520 motherboard (no IRQ?)

From: Daniel O'Connor via freebsd-stable <freebsd-stable_at_freebsd.org>
Date: Thu, 25 Nov 2021 05:50:30 UTC

> On 25 Nov 2021, at 14:19, Daniel O'Connor <darius@dons.net.au> wrote:
>> One thing I did notice is this dmesg output:
>> xhci0: <XHCI (generic) USB 3.0 controller> mem 0xfcfa0000-0xfcfa7fff at device 0.0 on pci1
>> xhci0: 32 bytes context size, 64-bit DMAxhci1: <XHCI (generic) USB 3.0 controller
>> ...
>> xhci1: <XHCI (generic) USB 3.0 controller> mem 0xfcb00000-0xfcbfffff at device 0.3 on pci7
>> xhci1: 64 bytes context size, 64-bit DMA
>> ..
>> xhci2: <XHCI (generic) USB 3.0 controller> mem 0xfca00000-0xfcafffff at device 0.4 on pci7
>> xhci2: 64 bytes context size, 64-bit DMA
> 
> It seems this is a bit of a red herring as vmstat -i does show it getting IRQs, not sure why they don't show up in dmesg though. Some discussion on IRC suggests it is because the system has no legacy PCI IRQs.
> 
> However on the system in question the IRQ rate tops out at 1kHz and on the other it is 8kHz which I think explains my problem.
> 
> I'm going to have a look for BIOS settings today but getting a bit desperate for ideas..

I had a PCIe USB card lying around:
xhci1@pci0:3:0:0:       class=0x0c0330 rev=0x01 hdr=0x00 vendor=0x1106 device=0x3483 subvendor=0x1106 subdevice=0x3483
    vendor     = 'VIA Technologies, Inc.'
    device     = 'VL805/806 xHCI USB 3.0 Controller'
    class      = serial bus
    subclass   = USB
    bar   [10] = type Memory, range 64, base 0xfce00000, size 4096, enabled

And connecting my device to that fixes the speed problem (and shows >8000 IRQ/sec).

The difference between the A320 and A520 motherboards seem strange, since I would expect their USB controllers to be identical.

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum