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