* [Qemu-devel] [PATCH] usb-ehci: Clear the portstatus powner bit on device disconnect
@ 2012-01-13 13:28 Hans de Goede
2012-01-23 14:51 ` Gerd Hoffmann
0 siblings, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2012-01-13 13:28 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Hans de Goede, qemu-devel
According to the EHCI spec port ownerhsip 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 <hdegoede@redhat.com>
---
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 a946e1d..69bcc4b 100644
--- a/hw/usb-ehci.c
+++ b/hw/usb-ehci.c
@@ -764,6 +764,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.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] usb-ehci: Clear the portstatus powner bit on device disconnect
2012-01-13 13:28 [Qemu-devel] [PATCH] usb-ehci: Clear the portstatus powner bit on device disconnect Hans de Goede
@ 2012-01-23 14:51 ` Gerd Hoffmann
2012-01-23 16:12 ` Andreas Färber
0 siblings, 1 reply; 4+ messages in thread
From: Gerd Hoffmann @ 2012-01-23 14:51 UTC (permalink / raw)
To: Hans de Goede; +Cc: qemu-devel
On 01/13/12 14:28, Hans de Goede wrote:
> According to the EHCI spec port ownerhsip 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.
Patch added to usb patch queue.
thanks,
Gerd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] usb-ehci: Clear the portstatus powner bit on device disconnect
2012-01-23 14:51 ` Gerd Hoffmann
@ 2012-01-23 16:12 ` Andreas Färber
2012-01-23 16:31 ` Gerd Hoffmann
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2012-01-23 16:12 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Hans de Goede, qemu-devel
Am 23.01.2012 15:51, schrieb Gerd Hoffmann:
> On 01/13/12 14:28, Hans de Goede wrote:
>> According to the EHCI spec port ownerhsip should revert to the EHCI controller
ownership
>> 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.
>
> Patch added to usb patch queue.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] usb-ehci: Clear the portstatus powner bit on device disconnect
2012-01-23 16:12 ` Andreas Färber
@ 2012-01-23 16:31 ` Gerd Hoffmann
0 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2012-01-23 16:31 UTC (permalink / raw)
To: Andreas Färber; +Cc: Hans de Goede, qemu-devel
On 01/23/12 17:12, Andreas Färber wrote:
> Am 23.01.2012 15:51, schrieb Gerd Hoffmann:
>> On 01/13/12 14:28, Hans de Goede wrote:
>>> According to the EHCI spec port ownerhsip should revert to the EHCI controller
>
> ownership
Fixed.
thanks,
Gerd
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-23 16:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 13:28 [Qemu-devel] [PATCH] usb-ehci: Clear the portstatus powner bit on device disconnect Hans de Goede
2012-01-23 14:51 ` Gerd Hoffmann
2012-01-23 16:12 ` Andreas Färber
2012-01-23 16:31 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).