summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-03-31 17:14:22 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-04-26 12:21:17 +0200
commita0625c56e0db19029cb69e28859af56b2ae19f3f (patch)
treedad9acded120562dbb8b86d22f867d5f4d3ae810 /hw
parent1510168e273a12a56e3bd4488b4b2904f5138e09 (diff)
downloadqemu-a0625c56e0db19029cb69e28859af56b2ae19f3f.tar.gz
usb-redir: Reset device address and speed on disconnect
Without this disconnected devices look like the last redirected device in the monitor in "info usb". Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/usb/redirect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 3e6e7e9c73..b2576e86a6 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -1136,6 +1136,8 @@ static void usbredir_device_disconnect(void *priv)
}
usb_ep_init(&dev->dev);
dev->interface_info.interface_count = NO_INTERFACE_INFO;
+ dev->dev.addr = 0;
+ dev->dev.speed = 0;
}
static void usbredir_interface_info(void *priv,