cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
b38b0f
From 874e4b3556ad42ff5b93b44305186be68fefce99 Mon Sep 17 00:00:00 2001
69f3e1
From: Gerd Hoffmann <kraxel@redhat.com>
69f3e1
Date: Tue, 4 Jun 2019 05:12:45 +0100
b38b0f
Subject: [PATCH 3/8] usb-host: skip reset for untouched devices
69f3e1
MIME-Version: 1.0
69f3e1
Content-Type: text/plain; charset=UTF-8
69f3e1
Content-Transfer-Encoding: 8bit
69f3e1
69f3e1
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
69f3e1
Message-id: <20190604051246.11374-4-kraxel@redhat.com>
69f3e1
Patchwork-id: 88474
69f3e1
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH 3/4] usb-host: skip reset for untouched devices
b38b0f
Bugzilla: 1713677
69f3e1
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
69f3e1
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
69f3e1
RH-Acked-by: Max Reitz <mreitz@redhat.com>
69f3e1
69f3e1
If the guest didn't talk to the device yet, skip the reset.
69f3e1
Without this usb-host devices get resetted a number of times
69f3e1
at boot time for no good reason.
69f3e1
69f3e1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
69f3e1
Message-id: 20190522094702.17619-3-kraxel@redhat.com
69f3e1
(cherry picked from commit 65f14ab98da1da920f98ee8734dc1588b01d6b2b)
69f3e1
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
69f3e1
---
69f3e1
 hw/usb/host-libusb.c | 3 +++
69f3e1
 1 file changed, 3 insertions(+)
69f3e1
69f3e1
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
69f3e1
index d82a10a..dd3ed02 100644
69f3e1
--- a/hw/usb/host-libusb.c
69f3e1
+++ b/hw/usb/host-libusb.c
69f3e1
@@ -1454,6 +1454,9 @@ static void usb_host_handle_reset(USBDevice *udev)
69f3e1
     if (!s->allow_guest_reset) {
69f3e1
         return;
69f3e1
     }
69f3e1
+    if (udev->addr == 0) {
69f3e1
+        return;
69f3e1
+    }
69f3e1
 
69f3e1
     trace_usb_host_reset(s->bus_num, s->addr);
69f3e1
 
69f3e1
-- 
69f3e1
1.8.3.1
69f3e1