From: Gerd Hoffmann Date: Thu, 1 Mar 2012 14:14:12 +0000 (+0100) Subject: xhci: fix port status X-Git-Tag: v1.1-rc0~262^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf21a4aef712075d313da4ea924a3376574c16e5;p=thirdparty%2Fqemu.git xhci: fix port status 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 --- diff --git a/hw/usb-xhci.c b/hw/usb-xhci.c index 83054896a62..e8f1b6e3a5c 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: