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 1165478 - guest can not find usb stick when attach this usb stick via usb-host using usb-hub
Summary: guest can not find usb stick when attach this usb stick via usb-host using us...
Keywords:
Status: CLOSED DUPLICATE of bug 1160504
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.0
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-19 03:16 UTC by Jun Li
Modified: 2014-11-27 10:11 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-27 10:11:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jun Li 2014-11-19 03:16:25 UTC
Description of problem:
Insert a usb stick to host. Then boot guest attach this usb stick via usb-host using usb-hub. After guest boot up, can not find this usb stick inside guest.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.1.2-8.el7.x86_64
host kernel:
3.10.0-205.el7.x86_64
Guest kernel:
3.10.0-205.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Insert a usb stick into host via xhci.
# lsusb
...
Bus 003 Device 004: ID 0951:1642 Kingston Technology DT101 G2
...
# lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 12M
        |__ Port 1: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 1: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 4: Dev 4, If 0, Class=Mass Storage, Driver=usbfs, 480M
...
2.boot guest attach this usb stick via usb-host using usb-hub.
e.g:
# /usr/libexec/qemu-kvm -m 2G -smp 2 -boot menu=on -drive file=/root/RHEL-7.1-20141111.0.qcow2,if=none,id=img,snapshot=on -device virtio-blk-pci,drive=img,id=sys-img,bootindex=1 -monitor stdio -qmp tcp::8888,server,nowait -spice port=5931,disable-ticketing -serial unix:/tmp/ttyS0,server,nowait -netdev tap,id=tap0,script=/etc/qemu-ifup,vhost=on -device virtio-net-pci,netdev=tap0,id=net0,mac=24:be:05:12:33:11,mq=on,bootindex=2 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 \
-device nec-usb-xhci,id=xhci0 \
-device usb-hub,id=hub,bus=xhci0.0,port=2 \
-device usb-host,bus=xhci0.0,hostbus=3,hostaddr=4,port=2.1
3.check this usb stick inside guest.

Actual results:
After step3, can not find this usb stick inside guest.
Guest dmesg:
# dmesg
...
[    6.283377] XFS (vda1): Mounting V4 Filesystem
[    6.290699] ppdev: user-space parallel port driver
[    6.294134] usb 1-2.1: new low-speed USB device number 6 using xhci_hcd
[    6.851180] usb 1-2.1: Invalid ep0 maxpacket: 64
[    6.851361] usb 1-2-port1: unable to enumerate USB device
[    6.875011] Adding 2097148k swap on /dev/mapper/rhel_dhcp--8--122-swap.  Priority:-1 extents:1 across:2097148k FS
[    6.930237] XFS (vda1): Starting recovery (logdev: internal)
[    6.931164] XFS (vda1): Ending recovery (logdev: internal)
...

Check this usb stick inside guest:
# lsusb
Bus 001 Device 002: ID 0409:55aa NEC Corp. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/8p, 12M


Expected results:
can find this usb stick correctly.

Additional info:

Comment 2 Sibiao Luo 2014-11-19 04:39:26 UTC
(In reply to Jun Li from comment #0)
> -device nec-usb-xhci,id=xhci0 \
> -device usb-hub,id=hub,bus=xhci0.0,port=2 \
> -device usb-host,bus=xhci0.0,hostbus=3,hostaddr=4,port=2.1
You cann't passthrough the physical usb stick via simulate usb-hub, you can try usb-storage + usb-hub or physical usb stick pass-through to VM via physical usb hub device.

Best Regards,
sluo

Comment 3 Jun Li 2014-11-20 02:29:05 UTC


(In reply to Sibiao Luo from comment #2)
> (In reply to Jun Li from comment #0)
> > -device nec-usb-xhci,id=xhci0 \
> > -device usb-hub,id=hub,bus=xhci0.0,port=2 \
> > -device usb-host,bus=xhci0.0,hostbus=3,hostaddr=4,port=2.1
> You cann't passthrough the physical usb stick via simulate usb-hub, you can
> try usb-storage + usb-hub or physical usb stick pass-through to VM via
> physical usb hub device.
> 
> Best Regards,
> sluo

Retest with following tree:
http://people.redhat.com/ghoffman/bz1160504/

Version of components:
qemu-kvm-rhev-2.1.2-8.el7.bz1160504.1.x86_64

Steps and command line just as comment 0 show, this bz has gone. Can find usb stick inside guest correctly. Guest dmesg don't print "usb 1-2.1: Invalid ep0 maxpacket: 64".

Thanks Gerd and sluo.

Best Regards,
Jun Li

Comment 4 Gerd Hoffmann 2014-11-27 10:11:19 UTC

*** This bug has been marked as a duplicate of bug 1160504 ***


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