* [Qemu-devel] [PATCH] ehci: fix ehci_child_detach
@ 2012-03-26 12:32 Gerd Hoffmann
2012-03-26 12:47 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2012-03-26 12:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Looks like a cut+paste bug from ehci_detach. When the device itself is
detached from a ehci port (ehci_detach op) we have to clear the
device pointer for the companion port too. When a device gets removed
from a downstream port of a usb hub (ehci_child_detach op) the ehci port
where the usb hub is plugged in is not affected.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/hcd-ehci.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 60f9f5b..34f7538 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -797,7 +797,6 @@ static void ehci_child_detach(USBPort *port, USBDevice *child)
if (portsc & PORTSC_POWNER) {
USBPort *companion = s->companion_ports[port->index];
companion->ops->child_detach(companion, child);
- companion->dev = NULL;
return;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] ehci: fix ehci_child_detach
2012-03-26 12:32 [Qemu-devel] [PATCH] ehci: fix ehci_child_detach Gerd Hoffmann
@ 2012-03-26 12:47 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2012-03-26 12:47 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
Hi,
Oh, good one:
Acked-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
On 03/26/2012 02:32 PM, Gerd Hoffmann wrote:
> Looks like a cut+paste bug from ehci_detach. When the device itself is
> detached from a ehci port (ehci_detach op) we have to clear the
> device pointer for the companion port too. When a device gets removed
> from a downstream port of a usb hub (ehci_child_detach op) the ehci port
> where the usb hub is plugged in is not affected.
>
> Signed-off-by: Gerd Hoffmann<kraxel@redhat.com>
> ---
> hw/usb/hcd-ehci.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
> index 60f9f5b..34f7538 100644
> --- a/hw/usb/hcd-ehci.c
> +++ b/hw/usb/hcd-ehci.c
> @@ -797,7 +797,6 @@ static void ehci_child_detach(USBPort *port, USBDevice *child)
> if (portsc& PORTSC_POWNER) {
> USBPort *companion = s->companion_ports[port->index];
> companion->ops->child_detach(companion, child);
> - companion->dev = NULL;
> return;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-26 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-26 12:32 [Qemu-devel] [PATCH] ehci: fix ehci_child_detach Gerd Hoffmann
2012-03-26 12:47 ` Hans de Goede
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).