cryptospore / rpms / qemu-kvm

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