An welchem PCI-Device/Host-Controller hängen USB-Devices?

foofoobar

Rear Admiral
Registriert
Dez. 2011
Beiträge
5.227
Gegeben ist eine Maschine mit mehreren USB-Host-Controllern (lspci listet mehrere Devices), wie findet man raus welches USB-Device an welchen USB-Host-Controller hängt?
 
Code:
$ lsusb -tv
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 005: Dev 002, If 0, Class=Wireless, Driver=btusb, 480M
        ID 13d3:3563 IMC Networks 
    |__ Port 005: Dev 002, If 1, Class=Wireless, Driver=btusb, 480M
        ID 13d3:3563 IMC Networks 
    |__ Port 005: Dev 002, If 2, Class=Wireless, Driver=[none], 480M
        ID 13d3:3563 IMC Networks 
    |__ Port 006: Dev 003, If 0, Class=Vendor Specific Class, Driver=[none], 12M
        ID 0b05:1939 ASUSTek Computer, Inc. 
    |__ Port 006: Dev 003, If 2, Class=Human Interface Device, Driver=usbhid, 12M
        ID 0b05:1939 ASUSTek Computer, Inc. 
    |__ Port 007: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 05e3:0608 Genesys Logic, Inc. Hub
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 002: Dev 002, If 0, Class=Mass Storage, Driver=uas, 5000M
        ID 152d:a561 JMicron Technology Corp. / JMicron USA Technology Corp. 
    |__ Port 003: Dev 003, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        ID 2537:1068 Norelsys NS1068/NS1068X SATA Bridge Controller
    |__ Port 004: Dev 004, If 0, Class=Mass Storage, Driver=uas, 5000M
        ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 005.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 002: Dev 043, If 0, Class=Mass Storage, Driver=uas, 480M
        ID 152d:0580 JMicron Technology Corp. / JMicron USA Technology Corp. 
    |__ Port 004: Dev 036, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub
        |__ Port 001: Dev 037, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            ID 046d:c093 Logitech, Inc. M500s Optical Mouse
        |__ Port 001: Dev 037, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            ID 046d:c093 Logitech, Inc. M500s Optical Mouse
        |__ Port 002: Dev 038, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            ID 2516:003b Cooler Master Co., Ltd. 
        |__ Port 002: Dev 038, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            ID 2516:003b Cooler Master Co., Ltd. 
        |__ Port 002: Dev 038, If 2, Class=Human Interface Device, Driver=usbhid, 12M
            ID 2516:003b Cooler Master Co., Ltd. 
        |__ Port 003: Dev 039, If 0, Class=Audio, Driver=snd-usb-audio, 12M
            ID 0d8c:0134 C-Media Electronics, Inc. 
        |__ Port 003: Dev 039, If 1, Class=Audio, Driver=snd-usb-audio, 12M
            ID 0d8c:0134 C-Media Electronics, Inc. 
        |__ Port 003: Dev 039, If 2, Class=Human Interface Device, Driver=usbhid, 12M
            ID 0d8c:0134 C-Media Electronics, Inc. 
        |__ Port 004: Dev 040, If 0, Class=Hub, Driver=hub/3p, 480M
            ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub
            |__ Port 003: Dev 042, If 0, Class=Vendor Specific Class, Driver=ti_usb_3410_5052, 12M
                ID 0451:3410 Texas Instruments, Inc. TUSB3410 Microcontroller
/:  Bus 006.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 003: Dev 002, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        ID 18a5:0428 Verbatim, Ltd 
    |__ Port 004: Dev 013, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 0451:8140 Texas Instruments, Inc. TUSB8041 4-Port Hub
        |__ Port 004: Dev 014, If 0, Class=Hub, Driver=hub/3p, 5000M
            ID 0451:8140 Texas Instruments, Inc. TUSB8041 4-Port Hub
 
  • Gefällt mir
Reaktionen: TomH22
Wenn lspci das auch verbose nicht weiter aufdröselt, und ich weiß gerade nicht auswendig ob es das macht (gleiches gilt für lstopo und hwloc), dann würde ich mal lsusb dazu befragen.
 
Vielleicht ist es noch etwas besser, wen. Du sagst warum du den controller herausfinden möchtest ;-)
 
@Der_Dicke82 Um das richtige PCI-Device in eine VM verschieben zu können.
Um ein sperriges USB-Device unter einem anderen OS zu testen.
 
Code:
 $ lsusb -tvv
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /sys/bus/usb/devices/usb2  /dev/bus/usb/002/001
    |__ Port 004: Dev 004, If 0, Class=Mass Storage, Driver=uas, 5000M
        ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
        /sys/bus/usb/devices/2-4  /dev/bus/usb/002/004
    
$ ll  /sys/bus/usb/devices/2-4
lrwxrwxrwx. 1 root root 0  7. Nov 07:46 /sys/bus/usb/devices/2-4 -> ../../../devices/pci0000:00/0000:00:01.2/0000:02:00.0/usb2/2-4

$ lspci | grep -i usb
02:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] 500 Series Chipset USB 3.1 XHCI Controller
05:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
0e:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller

-> die externe ssd mit dem asmedia controller unter /sys/bus/usb/devices/2-4 hängt wohl am usb-controller des chipsatzes.

und beim durchreichen von pcie-geräten immer schön auf die iommu-gruppen achten, sonst schiesst du dich evtl. selbst ab.
 
Zuletzt bearbeitet:
0x8100 schrieb:
-> die externe ssd mit dem asmedia controller unter /sys/bus/usb/devices/2-4 hängt wohl am usb-controller des chipsatzes.
Ich hab mich jetzt selbst über den /sys Irrgarten rangehangelt: (Allerdings via /sys/bus/pci und nicht via sys/bus/usb)
Code:
$ cat /sys/bus/pci/devices/0000\:2a\:00.3/usb[0-9]*/[0-9]-*/idProduct
0078
0905
ff01
$
Ist nur ein Beispiel und nicht vollständig, da gibt es bestimmt noch weitere Pitfalls.

Ich hatte einfach die Hoffnung das jemand schnell ein schlaues Cmd aus dem Hut zaubern kann.
 
  • Gefällt mir
Reaktionen: Der_Dicke82
Bei mir spuckt lspci alle USB Controller aus.
Hast du irgendwie alte Hardware die einen zusätzlichen Chipsatz hat? aber eigentlich ist ja auch da alles über pci angeschlossen.
 
Zurück
Oben