[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 8/9] usb: don't wakeup during coldplug
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 8/9] usb: don't wakeup during coldplug |
Date: |
Mon, 29 May 2017 15:09:55 +0200 |
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1452512
Signed-off-by: Gerd Hoffmann <address@hidden>
Message-id: address@hidden
---
hw/usb/core.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/usb/core.c b/hw/usb/core.c
index 45fa00c517..241ae66b15 100644
--- a/hw/usb/core.c
+++ b/hw/usb/core.c
@@ -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);
}
--
2.9.3
- [Qemu-devel] [PULL 0/9] usb patch queue, Gerd Hoffmann, 2017/05/29
- [Qemu-devel] [PULL 3/9] usb: Deprecate HMP commands usb_add and usb_del, Gerd Hoffmann, 2017/05/29
- [Qemu-devel] [PULL 2/9] usb: Deprecate the legacy -usbdevice option, Gerd Hoffmann, 2017/05/29
- [Qemu-devel] [PULL 1/9] ehci: fix overflow in frame timer code, Gerd Hoffmann, 2017/05/29
- [Qemu-devel] [PULL 9/9] ehci: fix frame timer invocation., Gerd Hoffmann, 2017/05/29
- [Qemu-devel] [PULL 5/9] xhci: split into multiple files, Gerd Hoffmann, 2017/05/29
- [Qemu-devel] [PULL 8/9] usb: don't wakeup during coldplug,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 4/9] usb: Simplify the parameter parsing of the legacy usb serial device, Gerd Hoffmann, 2017/05/29
- [Qemu-devel] [PULL 7/9] usb-hub: set PORT_STAT_C_SUSPEND on host-initiated wake-up, Gerd Hoffmann, 2017/05/29
- [Qemu-devel] [PULL 6/9] xhci: add CONFIG_USB_XHCI_NEC option, Gerd Hoffmann, 2017/05/29
- Re: [Qemu-devel] [PULL 0/9] usb patch queue, Stefan Hajnoczi, 2017/05/30