qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 1/9] usb: call reset handler before updating state


From: Gerd Hoffmann
Subject: [Qemu-devel] [PULL 1/9] usb: call reset handler before updating state
Date: Wed, 29 May 2019 08:28:24 +0200

That way the device reset handler can see what
the before-reset state of the device is.

Signed-off-by: Gerd Hoffmann <address@hidden>
Message-id: address@hidden
---
 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 8fbd9c7d573b..3ab48a16074b 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)
-- 
2.18.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]