From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SC96G-0001NS-D2 for qemu-devel@nongnu.org; Mon, 26 Mar 2012 08:32:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SC96A-0004lv-9Q for qemu-devel@nongnu.org; Mon, 26 Mar 2012 08:32:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SC96A-0004lF-1G for qemu-devel@nongnu.org; Mon, 26 Mar 2012 08:32:34 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2QCWWtW002281 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 26 Mar 2012 08:32:32 -0400 From: Gerd Hoffmann Date: Mon, 26 Mar 2012 14:32:30 +0200 Message-Id: <1332765150-16810-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] ehci: fix ehci_child_detach List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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