Bug 1404232

Summary: usbdk: Fix removal of redirection on hub unplug
Product: Red Hat Enterprise Linux 8 Reporter: Uri Lublin <uril>
Component: spice-usbdk-winAssignee: Dmitry Fleytman <dfleytma>
Status: CLOSED ERRATA QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: ---CC: bsanford, dblechte, dfleytma, eheftman, gklein, lsurette, rbalakri, tpelka, uril
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-usbdk-win-1.0-15 spice-client-msi-4.1-2 Doc Type: Enhancement
Doc Text:
Previously, when a USB hub containing a redirected device was unplugged, spice-usbdk-win failed to clean up the redirected device. When the USB hub and its attached device were replugged, the device could not be redirected. In this release, the issue has been fixed. spice-usbdk-win will now clean up the redirected device as required. When the USB hub and the USB device are re-plugged, the device can be redirected to the guest.
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Uri Lublin 2016-12-13 12:55:10 UTC
Description of problem:

  See upstream issue:
    https://github.com/daynix/UsbDk/issues/29

  The commit log of the fix (commit bf79d6e9425b1587aaa542c3)

  On unplug of USB hub that contains a redirected
  device, removal of redirection is started when redirected
  device PDO is still present in UsbDk device lists.
    
  In this case UsbDk will try to send reset IOCTL to this device
  and system will return STATUS_NO_SUCH_DEVICE error code.

  This commit changes behavior of redirection removal
  logic in a way that it will not interrupt removal
  process when such an error is returned by reset.

Upstream issue:
  https://github.com/daynix/UsbDk/issues/29


Version-Release number of selected component (if applicable):
  spice-usbdk-0.1-14

How reproducible:
Consistently, I guess, when a USB hub is unplugged

Steps to Reproduce:
  from upstream issue (report is for specific devices):
    https://github.com/daynix/UsbDk/issues/29#issuecomment-242362095

1. connect USBHUB(VID_05E3&PID_0608) & USBMemory(VID_04BB&PID_0CCB)
2. redirect USBMemory
3. disconnect USBHUB(with USBMemory)
4. press return key (exit UsbDkController.exe)
5. connect USBHUB(VID_05E3&PID_0608) & USBMemory(VID_04BB&PID_0CCB)
6. redirect USBMemory
7. redirect of USB device failed

Actual results:
USB device fails to redirect on 7
(UsbDk does not clean up the device on 3)

Expected results:
USB device can be redirected on 7
(UsbDk cleans up everything on 3)


Additional info:
    Fixed by commit bf79d6e9425b1587aaa542c3

Comment 4 Emma Heftman 2017-03-14 13:00:23 UTC
Hi Uri. Could you please set the requires_doc_text flag to - if no doc text is required, or ? if text should appear in the advisory. Then add the text to Doc Text field. Thanks.

Comment 5 Bill Sanford 2017-03-17 12:30:07 UTC
Verified in  spice-client-msi-4.1-4