diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-05-22 11:47:01 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-05-29 07:03:56 +0200 |
commit | 65f14ab98da1da920f98ee8734dc1588b01d6b2b (patch) | |
tree | 654cc486a7ff5f93a0e132b5c10dc9e7cd956ac3 /hw | |
parent | 7ed4657396add28382081a15557c78cd480c1cf1 (diff) |
usb-host: skip reset for untouched devices
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
Diffstat (limited to 'hw')
-rw-r--r-- | hw/usb/host-libusb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 67b7465915..4e9a45a5d2 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -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); |