aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-03-01 15:14:12 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-03-07 12:28:05 +0100
commitcf21a4aef712075d313da4ea924a3376574c16e5 (patch)
tree99e42438e3be5c53d3201f3b91437b248e885be0
parent2850ca9ed1023ce30ecd0582a66ded7a180e7616 (diff)
downloadqemu-cf21a4aef712075d313da4ea924a3376574c16e5.zip
qemu-cf21a4aef712075d313da4ea924a3376574c16e5.tar.gz
qemu-cf21a4aef712075d313da4ea924a3376574c16e5.tar.bz2
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 <kraxel@redhat.com>
-rw-r--r--hw/usb-xhci.c2
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: