OSDN Git Service

usb-redir: Reset device address and speed on disconnect
authorHans de Goede <hdegoede@redhat.com>
Sat, 31 Mar 2012 15:14:22 +0000 (17:14 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 26 Apr 2012 10:21:17 +0000 (12:21 +0200)
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>
hw/usb/redirect.c

index 3e6e7e9..b2576e8 100644 (file)
@@ -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,