From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3SOu-00068O-TY for qemu-devel@nongnu.org; Fri, 02 Mar 2012 08:20:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3SOV-0007tL-Oy for qemu-devel@nongnu.org; Fri, 02 Mar 2012 08:20:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3SOV-0007si-H3 for qemu-devel@nongnu.org; Fri, 02 Mar 2012 08:19:35 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q22DJYLP020421 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 2 Mar 2012 08:19:34 -0500 From: Gerd Hoffmann Date: Fri, 2 Mar 2012 14:19:30 +0100 Message-Id: <1330694370-1078-8-git-send-email-kraxel@redhat.com> In-Reply-To: <1330694370-1078-1-git-send-email-kraxel@redhat.com> References: <1330694370-1078-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 7/7] 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