Blame SOURCES/kvm-usb-host-skip-reset-for-untouched-devices.patch

7711c0
From 2aed844c2485cfc07bee58f67be64749655f7f12 Mon Sep 17 00:00:00 2001
7711c0
From: Gerd Hoffmann <kraxel@redhat.com>
7711c0
Date: Mon, 3 Jun 2019 13:45:49 +0200
7711c0
Subject: [PATCH 6/9] usb-host: skip reset for untouched devices
7711c0
MIME-Version: 1.0
7711c0
Content-Type: text/plain; charset=UTF-8
7711c0
Content-Transfer-Encoding: 8bit
7711c0
7711c0
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
7711c0
Message-id: <20190603134550.30153-4-kraxel@redhat.com>
7711c0
Patchwork-id: 88448
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 3/4] usb-host: skip reset for untouched devices
7711c0
Bugzilla: 1710861
7711c0
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
7711c0
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
7711c0
RH-Acked-by: Max Reitz <mreitz@redhat.com>
7711c0
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
7711c0
If the guest didn't talk to the device yet, skip the reset.
7711c0
Without this usb-host devices get resetted a number of times
7711c0
at boot time for no good reason.
7711c0
7711c0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
7711c0
Message-id: 20190522094702.17619-3-kraxel@redhat.com
7711c0
(cherry picked from commit 65f14ab98da1da920f98ee8734dc1588b01d6b2b)
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 hw/usb/host-libusb.c | 3 +++
7711c0
 1 file changed, 3 insertions(+)
7711c0
7711c0
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
7711c0
index 0425f0e..1d7e386 100644
7711c0
--- a/hw/usb/host-libusb.c
7711c0
+++ b/hw/usb/host-libusb.c
7711c0
@@ -1450,6 +1450,9 @@ static void usb_host_handle_reset(USBDevice *udev)
7711c0
     if (!s->allow_guest_reset) {
7711c0
         return;
7711c0
     }
7711c0
+    if (udev->addr == 0) {
7711c0
+        return;
7711c0
+    }
7711c0
 
7711c0
     trace_usb_host_reset(s->bus_num, s->addr);
7711c0
 
7711c0
-- 
7711c0
1.8.3.1
7711c0