]> git.proxmox.com Git - mirror_qemu.git/commitdiff
usb-host: skip reset for untouched devices
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 22 May 2019 09:47:01 +0000 (11:47 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 29 May 2019 05:03:56 +0000 (07:03 +0200)
If the guest didn't talk to the device yet, skip the reset.
Without this usb-host devices get resetted a number of times
at boot time for no good reason.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20190522094702.17619-3-kraxel@redhat.com

hw/usb/host-libusb.c

index 67b7465915f50d0395d5e5b48e07ec967635142d..4e9a45a5d26f4c84c87f65b4e0c592fd04f8c994 100644 (file)
@@ -1459,6 +1459,9 @@ static void usb_host_handle_reset(USBDevice *udev)
     if (!s->allow_guest_reset) {
         return;
     }
+    if (udev->addr == 0) {
+        return;
+    }
 
     trace_usb_host_reset(s->bus_num, s->addr);