From 65f14ab98da1da920f98ee8734dc1588b01d6b2b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 22 May 2019 11:47:01 +0200 Subject: 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 Message-id: 20190522094702.17619-3-kraxel@redhat.com --- hw/usb/host-libusb.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hw/usb/host-libusb.c') 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); -- cgit v1.2.3