From: Gerd Hoffmann Date: Fri, 23 Mar 2012 14:43:45 +0000 (+0100) Subject: usb-ehci: fix ehci_child_detach X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=088351a7e50b7f14cda9520bcb8a7896e226aa36;p=qemu.git usb-ehci: fix ehci_child_detach 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 --- diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 60f9f5bdb5..34f7538066 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; }