Bug 728167 - usb-hub doesn't work under EHCI adapter
Summary: usb-hub doesn't work under EHCI adapter
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.2
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: 2011-08-04 09:10 UTC by juzhang
Modified: 2013-01-10 00:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-12 09:15:27 UTC


Attachments (Terms of Use)

Description juzhang 2011-08-04 09:10:02 UTC
Description of problem:
Can't find usb-hub device in guest under  EHCI adapter 


Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.175.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Boot guest with usb-hub and -device usb-ehci,id=ehci and usb-storage
#/usr/libexec/qemu-kvm -M rhel6.2.0 -enable-kvm -m 2G -smp 2,cores=2,threads=1,sockets=1  -name RHEL6.1_32 -uuid 50eba0fa-c3bc-4634-9c87-e46fc4dafab9 -rtc base=utc,clock=host,driftfix=slew -boot menu=on -drive file=/root/zhangjunyi/RHEL6.1_64-copy-2.qcow2,if=none,id=drive-ide-0-0,media=disk,format=qcow2,cache=none,werror=stop,index=0 -device virtio-blk-pci,drive=drive-ide-0-0,id=ide0-0-0,bootindex=1 -netdev tap,id=hostnet1 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=78:2B:CB:AF:11:11 -vnc :10 -monitor stdio -balloon none 
/
-device usb-ehci,id=ehci -device usb-hub,bus=ehci.0,port=1 -device usb-hub,bus=ehci.0,port=2 -device usb-hub,bus=ehci.0,port=3 -device usb-hub,bus=ehci.0,port=4 
/
-device usb-storage,bus=ehci.0,port=1.1,drive=usbstick1 -drive if=none,id=usbstick1,file=/root/zhangjunyi/usbdevice1.qcow2

2.check usb in qemu
#(qemu) info usb
  Device 0.1, Port 1, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.2, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.3, Port 3, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.4, Port 4, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.5, Port 1.1, Speed 12 Mb/s, Product QEMU USB MSD
3.in guest


  
Actual results:
After step3,can't find usb-hub device and usb-storage and saw wrong message "hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?"

Expected results:
1.if we support usb-hub work under EHCI adapter 
usb-hub works well and find usb-storage device
2.if we don't support usb-hub&EHCI adapter
should not let guest boot and promote friendly message.

Additional info:
Usb-hub works well under UHCI adapter
#-usb -device usb-hub,bus=usb.0,port=1 -device usb-hub,bus=usb.0,port=2 -device usb-storage,bus=usb.0,port=1.1,drive=usbstick1 -drive if=none,id=usbstick1,file=/root/zhangjunyi/usbdevice1.qcow2

Comment 1 Gerd Hoffmann 2011-08-12 09:15:27 UTC
The USB Hub emulated by qemu is a USB 1.1 Hub and thus doesn't work on EHCI by design.  You can hook it up nevertheless by using a companion controller setup (see bug 728120 for how to do that).

Adding USB 2.0 support to the hub is possible.  It is a non-trivial effort though and involves a bunch of changes in both usb-ehci and usb-hub to implement split-transfers.  Very unlikely to happen for RHEL-6, you might want to file a RFE bug for RHEL-7 though.


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