[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/28] usb-ehci: Clear the portstatus powner bit on
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 02/28] usb-ehci: Clear the portstatus powner bit on device disconnect |
Date: |
Fri, 10 Feb 2012 12:42:58 +0100 |
From: Hans de Goede <address@hidden>
According to the EHCI spec port ownership should revert to the EHCI controller
on device disconnect. This fixes the problem of a port getting stuck on USB 1
when using redirection and plugging in a USB 2 device after a USB 1 device
has been redirected.
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb-ehci.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c
index 75ef71e..cdd7415 100644
--- a/hw/usb-ehci.c
+++ b/hw/usb-ehci.c
@@ -765,6 +765,11 @@ static void ehci_detach(USBPort *port)
USBPort *companion = s->companion_ports[port->index];
companion->ops->detach(companion);
companion->dev = NULL;
+ /*
+ * EHCI spec 4.2.2: "When a disconnect occurs... On the event,
+ * the port ownership is returned immediately to the EHCI controller."
+ */
+ *portsc &= ~PORTSC_POWNER;
return;
}
--
1.7.1
- [Qemu-devel] [PULL 00/28] usb patch queue, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 02/28] usb-ehci: Clear the portstatus powner bit on device disconnect,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 04/28] usb: kill USB_MSG_{ATTACH,DETACH}, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 08/28] usb-hub: implement find_device, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 01/28] usb-uhci: implement bandwidth management, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 07/28] usb: add usb_find_device(), Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 22/28] usb: add USBBusOps->wakeup_endpoint, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 10/28] usb-uhci: switch to usb_find_device(), Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 03/28] usb-redir: Add the posibility to filter out certain devices from redirecion, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 18/28] usb: add USBEndpoint->{nr,pid}, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 06/28] usb: kill usb_send_msg, Gerd Hoffmann, 2012/02/10
- [Qemu-devel] [PATCH 14/28] usb-xhci: switch to usb_find_device(), Gerd Hoffmann, 2012/02/10