Patchwork [1/2] Return usb device to host on usb_del command

login
register
mail settings
Submitter Shahar Havivi
Date June 16, 2010, 12:15 p.m.
Message ID <2624d3a043d5370897a326a182c5ed9c1e5f3d0a.1276689582.git.shaharh@redhat.com>
Download mbox | patch
Permalink /patch/55878/
State New
Headers show

Comments

Shahar Havivi - June 16, 2010, 12:15 p.m.
Signed-off-by: Shahar Havivi <shaharh@redhat.com>
---
 usb-linux.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/usb-linux.c b/usb-linux.c
index 88273ff..22a85e3 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -991,6 +991,7 @@  static int usb_host_close(USBHostDevice *dev)
     async_complete(dev);
     dev->closing = 0;
     usb_device_detach(&dev->dev);
+    ioctl(dev->fd, USBDEVFS_RESET);
     close(dev->fd);
     dev->fd = -1;
     return 0;