usb: call reset handler before updating state
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
This commit is contained in:
parent
da35f7f1ee
commit
7ed4657396
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user