Bug 207707 - USB pass through to qemu/kvm causes CDROM reset and "device not configured"
Summary: USB pass through to qemu/kvm causes CDROM reset and "device not configured"
Status: RESOLVED OBSOLETE
Alias: None
Product: Virtualization
Classification: Unclassified
Component: kvm (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: virtualization_kvm
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-12 22:20 UTC by Steffen Nurpmeso
Modified: 2021-01-28 20:51 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.10.10
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Steffen Nurpmeso 2020-05-12 22:20:52 UTC
Hello.
I update my 4.19 kernel each Saturday.
In March i wrote a C program that accesses CDDA data (toc, CD-TEXT, etc), and ported it to *BSD via qemu/kvm via USB pass through (i could).  I updated the binary (s-cdda) last on March 16th.

Now, two weeks ago i wanted to pass through the USB CD-ROM again, and it did not work no more with error as below.  This was directly after updating to qemu 5.0.0, so i reinstalled 4.2.0, with which i did the above, but it did no longer work, too.
This is CRUX-Linux 3.5, and libusb has not changed. The only thing that really changed otherwise is the kernel, i would say.

I used this USB CD-ROM:

May 11 22:25:32 kent kernel: usb 1-1: new high-speed USB device number 5 using xhci_hcd
May 11 22:25:32 kent kernel: usb 1-1: New USB device found, idVendor=0e8d, idProduct=1806, bcdDevice= 0.00
May 11 22:25:32 kent kernel: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 11 22:25:32 kent kernel: usb 1-1: Product: MT1887
May 11 22:25:32 kent kernel: usb 1-1: Manufacturer: MediaTek Inc
May 11 22:25:32 kent kernel: usb 1-1: SerialNumber: S16D6YMG2003AB
May 11 22:25:32 kent kernel: usb-storage 1-1:1.0: USB Mass Storage device detected
May 11 22:25:32 kent kernel: scsi host0: usb-storage 1-1:1.0
May 11 22:25:33 kent kernel: scsi 0:0:0:0: CD-ROM            TSSTcorp CDDVDW SE-218GN  TS00 PQ: 0 ANSI: 0
May 11 22:25:33 kent kernel: sr 0:0:0:0: Power-on or device reset occurred
May 11 22:25:33 kent kernel: sr 0:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
May 11 22:25:33 kent kernel: cdrom: Uniform CD-ROM driver Revision: 3.20
May 11 22:25:33 kent kernel: sr 0:0:0:0: Attached scsi CD-ROM sr0
May 11 22:25:33 kent kernel: sr 0:0:0:0: Attached scsi generic sg0 type 5

And it works.  I start qemu, the device disappears on the host, the guest OS detects it during boot, and this causes a "reset":

May 11 22:27:31 kent kernel: usb 1-1: reset high-speed USB device number 5 using xhci_hcd

After which the device is still not back in the host, and also inaccessible in the guest (FreeBSD says "device not configured" when i try to access it).

Is this right here, or should i open an USB bug?
Happy to help or test, thank you!
Comment 1 Steffen Nurpmeso 2021-01-28 20:51:15 UTC
It seems fixed with 5.10.10.

Note You need to log in before you can comment on or make changes to this bug.