Bug 842837

Summary: USBClerk: Winusb driver is not completely uninstalled when a USB device is disconnected from guest.
Product: Red Hat Enterprise Virtualization Manager Reporter: Marian Krcmarik <mkrcmari>
Component: usb-clerk-winAssignee: Arnon Gilboa <agilboa>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: acathrow, dblechte, iheim, mbarta, uril
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Windows   
Whiteboard: spice
Fixed In Version: usbclerk-win-0.1-5 Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 17:58:04 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:
Attachments:
Description Flags
usbclerk: uninstall inf file on driver removal none

Description Marian Krcmarik 2012-07-24 17:18:04 UTC
Description of problem:
Once a USB device is connected to guest winusb driver is installed instead of an existign generic driver on Windows client, once user correctly disconnect USB device from guest, This driver should be correctly removed and that's why the generic one should be installed again - This does not happen, On Windows7 client, winusb driver is installed again, After removing winsusb driver, Windows looks up for suitable driver and finds winusb again. Maybe It is needed to remove driver bits completely from client machine?
Moreover when spice session is kept after disocnnecting USB device, winsusb driver is removed, Windows installs it again, then USB Clerk removes it again, Windows finds it and installs again and so on...

Note: I am using patched USB Clerk, the latest one usbclerk-win-0.1-3 does fail to remove winusb driver.

Version-Release number of selected component (if applicable):
usbclerk-win-0.1-3 + patch solving removal of winsusb driver - dealing with VID:PID format.
mingw-virt-viewer-0.5.3-8.el6
Client: Windows7
Guest: RHEL6

How reproducible:
always

Steps to Reproduce:
Steps to Reproduce:
1. Be sure you have an Windows client and USB device.
2. Be sure USB clerk service is running.
3. Connect to the guest with remote-viewer client and grab focus.
4. Plug USB device to the guest.
5. Disconnect USB device from guest (eject inside guest or uncheck in USB remote-viewer menu).
  
Actual results:
winsusb driver of the device is removed but installed again.

Expected results:
winsusb driver of the device is removed and generic usb driver is installed.

Additional info:
The loop of installing/removing the winusb driver looks like this in logs:
1748::INFO::2012-07-23 17:44:48,661::USBClerk:ispatch_message::Completed successfully
    1748::INFO::2012-07-23 17:45:05,447::USBClerk:ispatch_message::Removing winusb driver for 0951:162d
    1748::INFO::2012-07-23 17:45:05,462::USBClerk::remove_winusb_driver::Removing 0951:162d
    1748::INFO::2012-07-23 17:45:06,324::USBClerk:ispatch_message::Completed successfully
    1748::INFO::2012-07-23 17:45:14,015::USBClerk:ispatch_message::Removing winusb driver for 0951:162d
    1748::INFO::2012-07-23 17:45:14,015::USBClerk::remove_winusb_driver::Removing 0951:162d
    1748::INFO::2012-07-23 17:45:15,171::USBClerk:ispatch_message::Completed successfully
    1748::INFO::2012-07-23 17:45:17,979::USBClerk:ispatch_message::Removing winusb driver for 0951:162d
    1748::INFO::2012-07-23 17:45:17,994::USBClerk::remove_winusb_driver::Removing 0951:162d
    1748::INFO::2012-07-23 17:45:19,117::USBClerk:ispatch_message::Completed successfully
    1748::INFO::2012-07-23 17:45:22,377::USBClerk:ispatch_message::Removing winusb driver for 0951:162d
    1748::INFO::2012-07-23 17:45:22,393::USBClerk::remove_winusb_driver::Removing 0951:162d
    1748::INFO::2012-07-23 17:45:23,517::USBClerk:ispatch_message::Completed successfully
    1748::INFO::2012-07-23 17:45:26,403::USBClerk:ispatch_message::Removing winusb driver for 0951:162d
    1748::INFO::2012-07-23 17:45:26,403::USBClerk::remove_winusb_driver::Removing 0951:162d
    1748::INFO::2012-07-23 17:45:27,512::USBClerk:ispatch_message::Completed successfully
    1748::INFO::2012-07-23 17:45:30,398::USBClerk:ispatch_message::Removing winusb driver for 0951:162d
    1748::INFO::2012-07-23 17:45:30,398::USBClerk::remove_winusb_driver::Removing 0951:162d
    1748::INFO::2012-07-23 17:45:31,507::USBClerk:ispatch_message::Completed successfully
    1748::INFO::2012-07-23 17:45:34,487::USBClerk:ispatch_message::Removing winusb driver for 0951:162d
    1748::INFO::2012-07-23 17:45:34,503::USBClerk::remove_winusb_driver::Removing 0951:162d
    1748::INFO::2012-07-23 17:45:35,643::USBClerk:ispatch_message::Completed successfully
    1748::INFO::2012-07-23 17:45:39,277::USBClerk:ispatch_message::Removing winusb driver for 0951:162d
    1748::INFO::2012-07-23 17:45:39,293::USBClerk::remove_winusb_driver::Removing 0951:162d
    1748::INFO::2012-07-23 17:45:40,422::USBClerk:ispatch_message::Completed successfully

Comment 1 Marc-Andre Lureau 2012-07-24 17:30:18 UTC
Maybe this should go to Arnon, since it looks like USBClerk bug

Comment 2 Arnon Gilboa 2012-07-31 14:59:51 UTC
Created attachment 601540 [details]
usbclerk: uninstall inf file on driver removal

Comment 3 Uri Lublin 2012-08-08 09:45:32 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.

Comment 7 errata-xmlrpc 2012-12-04 17:58:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-1527.html