From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoqZ0-0002lc-2e for qemu-devel@nongnu.org; Mon, 26 May 2014 04:47:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoqYs-0002b3-5L for qemu-devel@nongnu.org; Mon, 26 May 2014 04:47:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoqYr-0002af-T8 for qemu-devel@nongnu.org; Mon, 26 May 2014 04:47:14 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4Q8lDwW029765 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 26 May 2014 04:47:13 -0400 From: Gerd Hoffmann Date: Mon, 26 May 2014 10:46:58 +0200 Message-Id: <1401094027-5275-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1401094027-5275-1-git-send-email-kraxel@redhat.com> References: <1401094027-5275-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 01/10] 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 Reviewed-by: Gonglei --- 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