render / rpms / qemu

Forked from rpms/qemu 9 months ago
Clone

Blame 0119-usb-ehci-Clear-the-portstatus-powner-bit-on-device-d.patch

Hans de Goede 1b1995
From 959f57d34f11daf0da6f73541243934f39dfb2b2 Mon Sep 17 00:00:00 2001
Hans de Goede 1b1995
From: Hans de Goede <hdegoede@redhat.com>
Hans de Goede 1b1995
Date: Fri, 13 Jan 2012 14:26:26 +0100
Hans de Goede 1b1995
Subject: [PATCH 119/140] usb-ehci: Clear the portstatus powner bit on device
Hans de Goede 1b1995
 disconnect
Hans de Goede 1b1995
Hans de Goede 1b1995
According to the EHCI spec port ownerhsip should revert to the EHCI controller
Hans de Goede 1b1995
on device disconnect. This fixes the problem of a port getting stuck on USB 1
Hans de Goede 1b1995
when using redirection and plugging in a USB 2 device after a USB 1 device
Hans de Goede 1b1995
has been redirected.
Hans de Goede 1b1995
Hans de Goede 1b1995
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede 1b1995
---
Hans de Goede 1b1995
 hw/usb-ehci.c |    5 +++++
Hans de Goede 1b1995
 1 file changed, 5 insertions(+)
Hans de Goede 1b1995
Hans de Goede 1b1995
diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c
Hans de Goede 1b1995
index a946e1d..69bcc4b 100644
Hans de Goede 1b1995
--- a/hw/usb-ehci.c
Hans de Goede 1b1995
+++ b/hw/usb-ehci.c
Hans de Goede 1b1995
@@ -764,6 +764,11 @@ static void ehci_detach(USBPort *port)
Hans de Goede 1b1995
         USBPort *companion = s->companion_ports[port->index];
Hans de Goede 1b1995
         companion->ops->detach(companion);
Hans de Goede 1b1995
         companion->dev = NULL;
Hans de Goede 1b1995
+        /*
Hans de Goede 1b1995
+         * EHCI spec 4.2.2: "When a disconnect occurs... On the event,
Hans de Goede 1b1995
+         * the port ownership is returned immediately to the EHCI controller."
Hans de Goede 1b1995
+         */
Hans de Goede 1b1995
+        *portsc &= ~PORTSC_POWNER;
Hans de Goede 1b1995
         return;
Hans de Goede 1b1995
     }
Hans de Goede 1b1995
 
Hans de Goede 1b1995
-- 
Hans de Goede 1b1995
1.7.9.3
Hans de Goede 1b1995