You are not logged in.

#1 2021-01-18 20:10:37

sh0rez
Member
Registered: 2020-08-31
Posts: 3

USB devices show up at wrong BUS

I have a macOS QEMU VM and I want to use some USB devices from within. I have tried to forward single USB devices, but no luck, macOS won't pick that up. I at Reddit (https://www.reddit.com/r/hackintosh/com … ssthrough/) that what works is passing the entire USB controller as a PCI device. For that, I seems like I need to identify a USB controller that is otherwise unused. I did that, BUS4 appears to be a candidate.
I identified the PCI id using this command:

for usb_ctrl in $(find /sys/bus/usb/devices/usb* -maxdepth 0 -type l)
    do
       pci_path="$(dirname "$(realpath "${usb_ctrl}")")"
       echo "Bus $(cat "${usb_ctrl}/busnum") --> $(basename $pci_path)
         (IOMMU group $(basename $(realpath $pci_path/iommu_group)))"
       lsusb -s "$(cat "${usb_ctrl}/busnum"):"
       echo
    done

However, devices I directly plug into BUS4 still appear in BUS1, which is surprising to me. BUS4 is a USB-C adapter plugged into the back of my laptop, and it has several built-in components like a card reader. These correctly show up at BUS4:

Bus 1 --> 0000:00:14.0
         (IOMMU group 6)
...
Bus 001 Device 054: ID 05ac:12a8 Apple, Inc. iPhone 5/5C/5S/6/SE
...
Bus 2 --> 0000:00:14.0
         (IOMMU group 6)
Bus 002 Device 019: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
Bus 002 Device 018: ID 2109:0813 VIA Labs, Inc. VL813 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 3 --> 0000:2c:00.0
         (IOMMU group 23)
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 4 --> 0000:2c:00.0
         (IOMMU group 23)
Bus 004 Device 009: ID 05e3:0749 Genesys Logic, Inc. SD Card Reader and Writer
Bus 004 Device 008: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Especially the iPhone should appear at Bus4, given that is the physical connection. Do I misunderstand something about USB here?

Offline

Board footer

Powered by FluxBB