Skip to content

Commit

Permalink
usb: don't wakeup during coldplug
Browse files Browse the repository at this point in the history
  • Loading branch information
kraxel committed May 29, 2017
1 parent 6361bbc commit 2602265
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hw/usb/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ void usb_wakeup(USBEndpoint *ep, unsigned int stream)
USBDevice *dev = ep->dev;
USBBus *bus = usb_bus_from_device(dev);

if (!qdev_hotplug) {
/*
* This is machine init cold plug. No need to wakeup anyone,
* all devices will be reset anyway. And trying to wakeup can
* cause problems due to hitting uninitialized devices.
*/
return;
}
if (dev->remote_wakeup && dev->port && dev->port->ops->wakeup) {
dev->port->ops->wakeup(dev->port);
}
Expand Down

0 comments on commit 2602265

Please sign in to comment.