From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5GYu-0005YI-K2 for qemu-devel@nongnu.org; Wed, 07 Mar 2012 08:05:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5GYb-0008GH-E3 for qemu-devel@nongnu.org; Wed, 07 Mar 2012 08:05:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:30178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5GYb-0008FE-5y for qemu-devel@nongnu.org; Wed, 07 Mar 2012 08:05:29 -0500 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 q27D5Rgw003692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 7 Mar 2012 08:05:27 -0500 From: Gerd Hoffmann Date: Wed, 7 Mar 2012 14:05:20 +0100 Message-Id: <1331125520-13467-21-git-send-email-kraxel@redhat.com> In-Reply-To: <1331125520-13467-1-git-send-email-kraxel@redhat.com> References: <1331125520-13467-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 20/20] xhci: fix port status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Don't signal port status change if the usb device isn't in attached state. Happens with usb-host devices with the pass-through device being plugged out at the host. Signed-off-by: Gerd Hoffmann --- hw/usb-xhci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/usb-xhci.c b/hw/usb-xhci.c index 8305489..e8f1b6e 100644 --- a/hw/usb-xhci.c +++ b/hw/usb-xhci.c @@ -2279,7 +2279,7 @@ static void xhci_update_port(XHCIState *xhci, XHCIPort *port, int is_detach) int nr = port->port.index + 1; port->portsc = PORTSC_PP; - if (port->port.dev && !is_detach) { + if (port->port.dev && port->port.dev->attached && !is_detach) { port->portsc |= PORTSC_CCS; switch (port->port.dev->speed) { case USB_SPEED_LOW: -- 1.7.1