Skip to contentSkip to conversation

USB passthrough - strange device keeps resetting

DISCUSSION Stefan Cornelius 2 participants 2 messages Apr 7, 2017 – Apr 10, 2017 KVM

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to passthrough a peculiar USB device. My best guess on what's happening: It's not supposed to be talked to from anything but the custom, non-Linux libusb-based "driver application" and resets itself whenever it detects something that's not according to their driver - including operations that are pretty standard and no problem at all for other devices.

Unfortunately, that also means that it resets itself when trying boot the guest it's supposed to be passed through. This causes the USB address on the Linux host to change (/dev/usb/01/xx becomes /dev/usb/01/xx+1), which in turn appears to prevent it from being passed through the guest correctly.

I've tried both the spice-based and the other redirection method, I've tried attaching it purely based on USB vendor and product id, tested various suggestions that I could find across the internet, but I constantly run into the same problem over and over again. I've tested a number of other devices, they all work fine - it's only this one device that's acting up and I'm now out of ideas.

I will appreciate any and every suggestion.

Thanks,

Signature · 1 line
Stefan Cornelius / Red Hat Product Security
#1 lore raw
Quoted 13 lines · Stefan Cornelius

I'm trying to passthrough a peculiar USB device. My best guess on what's happening: It's not supposed to be talked to from anything but the custom, non-Linux libusb-based "driver application" and resets itself whenever it detects something that's not according to their driver - including operations that are pretty standard and no problem at all for other devices.

Unfortunately, that also means that it resets itself when trying boot the guest it's supposed to be passed through. This causes the USB address on the Linux host to change (/dev/usb/01/xx becomes /dev/usb/01/xx+1), which in turn appears to prevent it from being passed through the guest correctly.

Quoted 8 lines

I've tried both the spice-based and the other redirection method, I've tried attaching it purely based on USB vendor and product id, tested various suggestions that I could find across the internet, but I constantly run into the same problem over and over again. I've tested a number of other devices, they all work fine - it's only this one device that's acting up and I'm now out of ideas.

I will appreciate any and every suggestion.

If you have access to the driver application perhaps you can capture the USB traffic on its native OS and compare against USB passthrough on KVM.

tcpdump can capture USB traffic on Linux (search for "usbmon").

There are free/demo programs to capture USB traffic on Windows. It's been a while since I used one so I've forgotten which one worked for me.

It would be interesting to compare native vs passthrough USB traffic. The packet captures are a good starting point for deeper discussion on the mailing list.

Stefan