Bug 1426537

Summary: USB with same vendor and product ID will only show the first one plugged into client in guest
Product: Red Hat Enterprise Linux 7 Reporter: Andrei Stepanov <astepano>
Component: virt-viewerAssignee: ybendito
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 7.4CC: astepano, bsanford, cfergeau, dblechte, dfleytma, djasa, gklein, lsurette, mtessun, rbalakri, rduda, rh-spice-bugs, spice-qe-bugs, srevivo, tpelka, victortoso, ybendito
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1425961 Environment:
Last Closed: 2017-03-10 14:58:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Spice RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1425961    

Description Andrei Stepanov 2017-02-24 08:44:11 UTC
+++ This bug was initially created as a clone of Bug #1425961 +++

Description of problem:
Using 2 of the same USBs (specific vendor and product ID are identical), only the first one plugged into the client is seen on the guest. The subsequent identical USBs that are plugged into client, are seen only on the client and not the guest.

When I use different USB devices, I don't have this problem, all of them are redirected to the guest.

Version-Release number of selected component (if applicable):

Guest - RHEL 6.9
Client - Windows 7x64
Engine and Hosts - RHEL 7.3z
rhv-4.1.0-12
virt-viewer 2.0-208
spice-client-msi-x64-4.1-4.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Victor Toso on 2017-02-23 02:31:07 EST ---

Could you please provide the logs from spice client?
Which kind of device is it?

--- Additional comment from Bill Sanford on 2017-02-23 09:56:45 EST ---

They are USB sticks. 

[bsanford@dhcp-25-232 ~]$ lsusb -d 8644:800b
Bus 001 Device 014: ID 8644:800b Intenso GmbG Micro Line (4GB)
Bus 001 Device 015: ID 8644:800b Intenso GmbG Micro Line (4GB)

I put the USB sticks in my laptop. Any devices that have the same vendor and product IDs, should work. I have another set of USBs that fail, as well as Brno team, astepano also confirmed this is a bug

--- Additional comment from Victor Toso on 2017-02-23 10:13:12 EST ---

It is still interesting to have:
1) dmesg (after trying to redirect the 2nd stick)
2) log of the session from spice client

--- Additional comment from Andrei Stepanov on 2017-02-23 10:14:41 EST ---

My case:

virt-viewer-2.0-6.el7_2.2.x86_64

spice-protocol-0.12.12-1.el7.noarch
spice-glib-0.31-8.el7.x86_64
spice-gtk3-0.31-8.el7.x86_64
spice-vdagent-0.14.0-14.el7.x86_64

spice-server-0.12.8-1.el7.x86_64

Flash on client can be seen as:

$ lsusb | grep -i king
Bus 001 Device 047: ID 0951:1666 Kingston Technology DataTraveler G4
Bus 002 Device 019: ID 0951:1666 Kingston Technology DataTraveler G4

--- Additional comment from Andrei Stepanov on 2017-02-23 10:16 EST ---

During connection:
step1: plug flash1
step2: plug flash2

--- Additional comment from Andrei Stepanov on 2017-02-23 10:21 EST ---



--- Additional comment from Andrei Stepanov on 2017-02-23 10:32 EST ---



--- Additional comment from Victor Toso on 2017-02-24 02:37:40 EST ---

Hi,

(In reply to Andrei Stepanov from comment #4)
> My case:
> 
> virt-viewer-2.0-6.el7_2.2.x86_64
> 
> spice-protocol-0.12.12-1.el7.noarch
> spice-glib-0.31-8.el7.x86_64
> spice-gtk3-0.31-8.el7.x86_64
> spice-vdagent-0.14.0-14.el7.x86_64

You can clone this one to rhel 7.4 then.

As it can be reproducible in rhel 7.4 it does not seem to be UsbDk bug.
Moving to client's component.

Comment 2 ybendito 2017-03-10 10:12:42 UTC
Checked with VirtViewer v.5-256 (release of the day) and UsbDK 1.0.17, the problem is not reproducible. Both devices visible and both can be redirected independently.

Comment 3 Andrei Stepanov 2017-03-10 14:58:51 UTC
I have two Kingston DataTravel USB devices. They are USB3 devices.
It depends where I attach above devices at my laptop.
If I attach USB3 drive to USB2 port(hub) it works as USB2 device.
remote-viewer works fine with it.
If I attach USB3 drive to USB3 port(hub) it works as USB3 device.
remote-viewer cannot work with USB3 devices. 
I had plugged second USB3 drive to USB3 port which could not be forwarded.


$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
    |__ Port 2: Dev 8, If 0, Class=Mass Storage, Driver=usb-storage, 5000M  (XXX: CANNOT FORWARD)
    |__ Port 5: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 480M
    |__ Port 6: Dev 28, If 0, Class=Mass Storage, Driver=usb-storage, 480M  (XXX: CAN BE FORWARDED)
    |__ Port 7: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 12M
    |__ Port 9: Dev 9, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 2: Dev 10, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 2: Dev 10, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 4: Dev 11, If 0, Class=Hub, Driver=hub/3p, 480M
    |__ Port 11: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 11: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 12: Dev 6, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 12: Dev 6, If 1, Class=Video, Driver=uvcvideo, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M



If I plugin two identical USB devices into USB2 port(hub) than remote-viewer can forward both of them to guest simultaneously.

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