OSDN Git Service

usb-hub: wakeup on detach too.
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 22 Nov 2011 12:20:14 +0000 (13:20 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 22 Nov 2011 13:12:36 +0000 (14:12 +0100)
When detaching devices from the usb hub we must wakeup too,
otherwise the host misses the detach event.

Commit 4a33a9ea06f6fbb08d8311a7cfed72975344f9ab does the
same for device attach.

Found by hkran@linux.vnet.ibm.com

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb-hub.c

index 3eb0f1a..5b48763 100644 (file)
@@ -171,6 +171,8 @@ static void usb_hub_detach(USBPort *port1)
     USBHubState *s = port1->opaque;
     USBHubPort *port = &s->ports[port1->index];
 
+    usb_wakeup(&s->dev);
+
     /* Let upstream know the device on this port is gone */
     s->dev.port->ops->child_detach(s->dev.port, port1->dev);