qemu Speed mismatch when passing USB device to FreeBSD running inside qemu

I want to pass HD Webcam USB device to the FreeBSD running in qemu.
I use following command to start the emulated system:
qemu-system-x86_64 -m 2048 \
-hda FreeBSD-12.1-RELEASE-amd64.qcow2 -enable-kvm \
-netdev user,id=mynet0,hostfwd=tcp:127.0.0.1:7722-:22 \
-device e1000,netdev=mynet0 \
-device usb-ehci \
-device piix4-usb-uhci \
-usb -device usb-hub \
-device usb-host,vendorid=0x04f2,productid=0xb65a

During the startup I get following warning (it is actually displayed 3 times):
qemu-system-x86_64: Warning: speed mismatch trying to attach usb device "HD Webcam" (high speed) to bus "usb-bus.2", port "2" (full speed)
When I lsusb devices inside FreeBSD my HD Webcam is not available:
Code:
Bus /dev/usb Device /dev/ugen2.2: ID 0409:55aa NEC Corp. Hub
Bus /dev/usb Device /dev/ugen0.1: ID 0000:0000
Bus /dev/usb Device /dev/ugen1.1: ID 0000:0000
Bus /dev/usb Device /dev/ugen2.1: ID 0000:0000

info usb executed inside qemu monitor console returns information about passed device:
Device 2.0, Port 2, Speed 480 Mb/s, Product HD Webcam

I am wondering what is wrong.
FreeBSD supports high speed mode USB.
I have 3 suspicions.
1. FreeBSD image for qemu is missing some USB drivers.
2. I need to pass more/different arguments to qemu on start.
3. My USB device is available inside FreeBSD, but it is not listed by lsusb.

Does anyone know what is going on?

EDIT
usbconfig returns:
Code:
ugen2.1: <Interl UHCI root HUB> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen1.1: <Interl UHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.1: <Interl UHCI root HUB> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen2.2: <QEMU QEMU USB Hub> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwd=SAVE (0mA)
 
To figure out if your point #3 is correct or incorrect, use the usbconfig command in your FreeBSD vm (virtual machine).
 
Looks like there is USB Hub created by qemu, however its speed mode is set to full, not high.
 
Issue solved. I had to replace
-device usb-ehci \
-device piix4-usb-uhci \

with
-device qemu-xhci \.
 
Back
Top