qemu-kvm/kvm-usb-call-reset-handler-before-updating-state.patch
Danilo C. L. de Paula 0544bace3c * Tue Jun 11 2019 Danilo Cesar Lemes de Paula <ddepaula@redhat.com> - 4.0.0-4.el8
- kvm-Disable-VXHS-support.patch [bz#1714937]
- kvm-aarch64-Add-virt-rhel8.1.0-machine-type-for-ARM.patch [bz#1713735]
- kvm-aarch64-Allow-ARM-VIRT-iommu-option-in-RHEL8.1-machi.patch [bz#1713735]
- kvm-usb-call-reset-handler-before-updating-state.patch [bz#1713679]
- kvm-usb-host-skip-reset-for-untouched-devices.patch [bz#1713679]
- kvm-usb-host-avoid-libusb_set_configuration-calls.patch [bz#1713679]
- kvm-aarch64-Compile-out-IOH3420.patch [bz#1627283]
- kvm-vl-Fix-drive-blockdev-persistent-reservation-managem.patch [bz#1714891]
- kvm-vl-Document-why-objects-are-delayed.patch [bz#1714891]
- Resolves: bz#1627283
  (Compile out IOH3420 on aarch64)
- Resolves: bz#1713679
  (Detached device when trying to upgrade USB device firmware when in doing USB Passthrough via QEMU)
- Resolves: bz#1713735
  (Allow ARM VIRT iommu option in RHEL8.1 machine)
- Resolves: bz#1714891
  (Guest with persistent reservation manager for a disk fails to start)
- Resolves: bz#1714937
  (Disable VXHS support)
2019-06-11 22:15:20 +01:00

48 lines
1.5 KiB
Diff

From 646f497c8e1dcea5c1ec8731693e3f06be8f6cc2 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Tue, 4 Jun 2019 07:13:39 +0100
Subject: [PATCH 4/9] usb: call reset handler before updating state
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
Message-id: <20190604071341.3432-2-kraxel@redhat.com>
Patchwork-id: 88478
O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 1/3] usb: call reset handler before updating state
Bugzilla: 1713679
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
RH-Acked-by: Max Reitz <mreitz@redhat.com>
That way the device reset handler can see what
the before-reset state of the device is.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20190522094702.17619-2-kraxel@redhat.com
(cherry picked from commit 7ed4657396add28382081a15557c78cd480c1cf1)
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
hw/usb/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/usb/core.c b/hw/usb/core.c
index 8fbd9c7..3ab48a1 100644
--- a/hw/usb/core.c
+++ b/hw/usb/core.c
@@ -87,10 +87,10 @@ void usb_device_reset(USBDevice *dev)
if (dev == NULL || !dev->attached) {
return;
}
+ usb_device_handle_reset(dev);
dev->remote_wakeup = 0;
dev->addr = 0;
dev->state = USB_STATE_DEFAULT;
- usb_device_handle_reset(dev);
}
void usb_wakeup(USBEndpoint *ep, unsigned int stream)
--
1.8.3.1