From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjpgD-0002k1-44 for qemu-devel@nongnu.org; Mon, 12 May 2014 08:50:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wjpg6-0005tF-Vo for qemu-devel@nongnu.org; Mon, 12 May 2014 08:50:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjpg6-0005t8-NX for qemu-devel@nongnu.org; Mon, 12 May 2014 08:49:58 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4CCnwBg014497 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 12 May 2014 08:49:58 -0400 From: Gerd Hoffmann Date: Mon, 12 May 2014 14:49:54 +0200 Message-Id: <1399898994-17436-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] xhci: child detach fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann xhci_child_detach() zaps the wrong slot when unplugging a device connected via usb-hub: Instead of the device's slot the slot of the usb-hub is used. Fix it. https://bugzilla.redhat.com/show_bug.cgi?id=1075846 Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index ef3177a..6753a42 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -3435,7 +3435,7 @@ static void xhci_child_detach(USBPort *uport, USBDevice *child) USBBus *bus = usb_bus_from_device(child); XHCIState *xhci = container_of(bus, XHCIState, bus); - xhci_detach_slot(xhci, uport); + xhci_detach_slot(xhci, child->port); } static USBPortOps xhci_uport_ops = { -- 1.8.3.1