48 lines
1.5 KiB
Diff
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
|
||
|
|