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 733599 - Usb webcam passthrough failed under ehci
Summary: Usb webcam passthrough failed under ehci
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-26 07:52 UTC by Shaolong Hu
Modified: 2011-09-12 07:48 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-12 07:48:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Shaolong Hu 2011-08-26 07:52:00 UTC
Description of problem:
------------------------
Passthrough usb webcam from host to guest failed.


Version-Release number of selected component (if applicable):
--------------------------------------------------------------
host:
qemu-kvm-0.12.1.2-2.184.el6.x86_64
2.6.32-191.el6.x86_64
guest:
2.6.32-128.el6.x86_64


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


Steps to Reproduce:
--------------------
1.boot guest with:
# /usr/libexec/qemu-kvm -enable-kvm -M rhel6.2.0 -smp 4 -m 4G -name rhel6.1-64 -uuid 3f2ea5cd-3d29-48ff-aab2-23df1b6ae213 -drive file=RHEL-Server-6.1-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,bootindex=1 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0 -boot order=cd,menu=on -monitor stdio -vnc :10 -device usb-ehci,id=ehci

2.in qemu monitor
(qemu)info usbhost

3.in qemu monitor
device_add usb-host,hostbus=3,hostaddr=7,id=camera

  
Actual results:
----------------
1.in qemu monitor
(qemu) info usbhost
husb: using sys file-system with /dev/bus/usb
  Bus 3, Addr 7, Port 1, Speed 12 Mb/s
    Class 00: USB device 045e:00f7, USB camera
  Bus 7, Addr 2, Port 1, Speed 12 Mb/s
    Hub: USB device 0557:7000
  Bus 7, Addr 3, Port 1.1, Speed 1.5 Mb/s
    Class 00: USB device 0557:2213, CS-1734A V4.2.411

2.in qemu monitor
(qemu) device_add usb-host,hostbus=3,hostaddr=7,id=camera
husb: open device 3.7
husb: config #1 need -1
husb: 3 interfaces claimed for configuration 1
husb: grabbed usb device 3.7
(qemu) husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
husb: config #1 need 1
husb: device 3.7 disconnected
husb: open device 3.7
/dev/bus/usb/003/007: No such device
USBDEVFS_DISCONNECT: No such file or directory

(qemu) info usb
(qemu)

3.in guest:
#dmesg
hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
hub 1-0:1.0: unable to enumerate USB device on port 1

#lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Expected results:
------------------
Usb webcam passthroughed should work correctly in guest. 


Additional info:
-------------------
When use "-usb" instead of "-device usb-ehci,id=ehci" in qemu command line, webcam works correctly in guest, but there is "husb: out of buffers for iso stream" prompt in qemu monitor constantly.

Comment 3 Gerd Hoffmann 2011-09-12 07:48:05 UTC
It is a usb 1.1. webcam, it will not work on a pure usb 2.0 host controller.
Just use 'usb' or create a EHCI controller with 1.1 companions using
http://www.kraxel.org/cgit/qemu/tree/docs/ich9-ehci-uhci.cfg

When constantly running out of buffers you can try more buffers using the isobufs property (device_add usb-host,hostbus=3,hostaddr=7,id=camera,isobufs=8).  Default value for isobufs is 4.


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