RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 949505 - Assign 3.0 usb device to ehci and uhci or usb hub got applied anyway with warning but fails to function
Summary: Assign 3.0 usb device to ehci and uhci or usb hub got applied anyway with war...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-08 10:05 UTC by Shaolong Hu
Modified: 2014-06-18 03:26 UTC (History)
8 users (show)

Fixed In Version: qemu-kvm-1.5.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:56:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Shaolong Hu 2013-04-08 10:05:43 UTC
Description of problem:
----------------------------
As subject.


Version-Release number of selected component (if applicable):
--------------------------------------------------------------
qemu-kvm-1.4.0-1.el7.x86_64


How reproducible:
------------------
100%

Steps to Reproduce:
---------------------------
1.boot guest with:

/usr/libexec/qemu-kvm -enable-kvm -smp 4 -m 4G -name rhel6.3-64 -uuid 3f2ea5cd-3d29-48ff-aab2-23df1b6ae213 -drive file=nfs/RHEL-Server-7.0-64-virtio.qcow2,cache=none,if=none,rerror=stop,werror=stop,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,drive=drive-virtio-disk0,id=device-virtio-disk0 -boot menu=on -monitor stdio -chardev socket,id=s1,path=/tmp/s1,server,nowait -device isa-serial,chardev=s1 -monitor tcp::1234,server,nowait -spice disable-ticketing,port=5920 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -vga qxl -global qxl-vga.vram_size=33554432 -qmp tcp:0:5555,server,nowait -netdev tap,script=/etc/qemu-ifup,id=netdev0,vhost=on,queues=4,vhostforce=off -device virtio-net-pci,netdev=netdev0,id=device-net0,mac=aa:54:00:11:22:33,vectors=9,mq=on -vnc :10 -device nec-usb-xhci,id=xhci -drive file=disk,if=none,id=drive-usb-0-0,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-0,id=usb-0-0,removable=on,bus=xhci.0,port=1,bootindex=1 -device usb-ehci,id=ehci -drive file=disk2,if=none,id=drive-usb-0-1,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-1,id=usb-0-1,removable=off,bus=ehci.0,port=1 -usb -device usb-tablet,id=input1,bus=usb-bus.0,port=1 -device usb-hub,bus=usb-bus.0,port=2,id=hub

2.

(qemu) device_add usb-host,hostbus=9,hostaddr=2,id=usb3.0,bus=usb-bus.0,port=2.1
(qemu) device_add usb-host,hostbus=10,hostaddr=2,id=usb4.0,bus=usb-bus.0,port=2.2
Warning: speed mismatch trying to attach usb device host:10.2 to bus usb-bus.0
(qemu) qemu-kvm: Warning: speed mismatch trying to attach usb device host:10.2 to bus usb-bus.0
qemu-kvm: Warning: speed mismatch trying to attach usb device host:10.2 to bus usb-bus.0

3. it got applied anyway

(qemu) info usb
  Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
  Device 0.3, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.4, Port 2.1, Speed 480 Mb/s, Product DT 101 G2
  Device 0.0, Port 2.2, Speed 5000 Mb/s, Product host:10.2
  Device 1.2, Port 1, Speed 5000 Mb/s, Product QEMU USB MSD
  Device 2.2, Port 1, Speed 480 Mb/s, Product QEMU USB MSD

4. the same to ehci

 
Actual results:
-----------------
3.0 usb disk can not even be recognized in guest, reject these kind of actions should be fine.

Comment 2 Sibiao Luo 2013-04-08 12:59:05 UTC
You hot-plug the first one is USB2.0 stick device and the second one is USB3.0 device.
As according to bug 921483 comment #5 that USB3.0 stick must be passed through using ehci (or xhci) and USB2.0 stick which support 1.1 controller and ehci. So i think the QEMU prompt that 'Warning: speed mismatch' is correctly and can not be recognized in guest, but both of the two USB sticks should work well on EHCI controller.

Best Regards.
sluo

Comment 3 Gerd Hoffmann 2013-04-15 09:29:41 UTC
Hook them directly to ehci ports, not via hub,
the qemu usb-hub does not support usb 2.0.

Comment 4 Shaolong Hu 2013-04-18 07:44:57 UTC
(In reply to comment #3)
> Hook them directly to ehci ports, not via hub,
> the qemu usb-hub does not support usb 2.0.

(qemu) device_add usb-host,hostbus=10,hostaddr=2,id=usb3.0,bus=ehci.0,port=2
Warning: speed mismatch trying to attach usb device host:10.2 to bus ehci.0
(qemu) qemu-kvm: Warning: speed mismatch trying to attach usb device host:10.2 to bus ehci.0
qemu-kvm: Warning: speed mismatch trying to attach usb device host:10.2 to bus ehci.0

(qemu) info usb
  Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
  Device 0.3, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
  Device 1.2, Port 1, Speed 5000 Mb/s, Product QEMU USB MSD
  Device 2.2, Port 1, Speed 480 Mb/s, Product QEMU USB MSD
  Device 2.0, Port 2, Speed 5000 Mb/s, Product host:10.2


in guest, the 3.0 disk can not be detect:

[root@localhost ~]# lsusb
Bus 001 Device 002: ID 46f4:0001  
Bus 002 Device 002: ID 0627:0001 Adomax Technology Co., Ltd 
Bus 002 Device 003: ID 0409:55aa NEC Corp. Hub
Bus 004 Device 002: ID 46f4:0001  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub


passthrough usb 3.0 disk to ehci can not work neither.


to compare, passthrough 3.0 disk to xhci, works correctly:

(qemu) device_add usb-host,hostbus=10,hostaddr=2,id=usb3.0,bus=xhci.0,port=2

(qemu) info usb
  Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
  Device 0.3, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
  Device 1.2, Port 1, Speed 5000 Mb/s, Product QEMU USB MSD
  Device 1.3, Port 2, Speed 5000 Mb/s, Product host:10.2
  Device 2.2, Port 1, Speed 480 Mb/s, Product QEMU USB MSD

in guest, the CompUSA one is the 3.0 disk:

[root@localhost ~]# lsusb
Bus 001 Device 002: ID 46f4:0001  
Bus 002 Device 002: ID 0627:0001 Adomax Technology Co., Ltd 
Bus 002 Device 003: ID 0409:55aa NEC Corp. Hub
Bus 004 Device 002: ID 46f4:0001  
Bus 004 Device 003: ID 1516:6221 CompUSA 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Comment 5 Gerd Hoffmann 2013-04-18 12:09:29 UTC
Ok, trying to sort things here:

There is one usb 2.0 stick.
There is one usb 3.0 stick.

The usb 2.0 stick should work on ehci + xhci (root port only).
The usb 3.0 stick should work on xhci (root port only too).

Plugging the usb 3.0 stick into a usb 2.0 port on the host machine (which effectively forces it into 2.0 mode) might make the 3.0 stick work on ehci too.

In case of a speed mismatch the usb device will simply not show up in the guest, so this is expected behavior.

Comment 6 Gerd Hoffmann 2013-05-14 12:38:48 UTC
Well, nothing is really broken here.  qemu 1.5 will have more detailed speed mismatch error messages (commit 3b7e759a4110690c9617b1ffa6a7c96a343a330d), so usability will be improved a bit.  I'll go set this to modified so qa can have a look at the new messages.

Comment 7 Miroslav Rezanina 2013-05-23 12:08:59 UTC
Build in qemu-kvm-1.5.0-1.el7

Comment 9 Shaolong Hu 2014-01-26 10:47:06 UTC
Verified on qemu-kvm-rhev-1.5.3-39.el7.x86_64:

(qemu) device_add usb-host,hostbus=10,hostaddr=2,id=usb3.0,bus=usb-bus.0,port=2.1
Warning: speed mismatch trying to attach usb device "" (super speed) to bus "usb-bus.0", port "2.1" (full speed)
(qemu) qemu-kvm: Warning: speed mismatch trying to attach usb device "" (super speed) to bus "usb-bus.0", port "2.1" (full speed)
qemu-kvm: Warning: speed mismatch trying to attach usb device "" (super speed) to bus "usb-bus.0", port "2.1" (full speed)


(qemu) device_add usb-host,hostbus=10,hostaddr=2,id=usb3.0,bus=ehci.0
Warning: speed mismatch trying to attach usb device "" (super speed) to bus "ehci.0", port "1" (high speed)
(qemu) qemu-kvm: Warning: speed mismatch trying to attach usb device "" (super speed) to bus "ehci.0", port "1" (high speed)
qemu-kvm: Warning: speed mismatch trying to attach usb device "" (super speed) to bus "ehci.0", port "1" (high speed)



To be noticed: there are three same warnings every time.

Comment 10 Ludek Smid 2014-06-13 11:56:59 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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