[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/6] usb-hub: clear PORT_STAT_SUSPEND on wakeup
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 4/6] usb-hub: clear PORT_STAT_SUSPEND on wakeup |
Date: |
Fri, 12 May 2017 14:21:56 +0200 |
From: Ladi Prosek <address@hidden>
The spec says:
Suspend: (PORT_SUSPEND) This field indicates whether or not the device
on this port is suspended. Setting this field causes the device to
suspend by not propagating bus traffic downstream. This field may be
reset by a request or by resume signaling from the device attached to
the port.
I can't find any specific statement like "the PORT_SUSPEND field is reset
automatically on remote wakeup", but without this patch, the only way to
reset it is via the ClearPortFeature request so the ".. or by resume
signaling from the device" clause is clearly not implemented on the remote
wakeup path.
The default xhci Windows driver does not issue the ClearPortFeature request
and suspended devices attached to a hub don't properly get out of the
suspended state. Interestingly, the default uhci Windows driver *does*
issue the ClearPortFeature request and does not exhibit this problem.
Signed-off-by: Ladi Prosek <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/dev-hub.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c
index 9fe7333946..47b7519910 100644
--- a/hw/usb/dev-hub.c
+++ b/hw/usb/dev-hub.c
@@ -208,6 +208,7 @@ static void usb_hub_wakeup(USBPort *port1)
USBHubPort *port = &s->ports[port1->index];
if (port->wPortStatus & PORT_STAT_SUSPEND) {
+ port->wPortStatus &= ~PORT_STAT_SUSPEND;
port->wPortChange |= PORT_STAT_C_SUSPEND;
usb_wakeup(s->intr, 0);
}
--
2.9.3
- [Qemu-devel] [PULL 0/6] usb patch queue, Gerd Hoffmann, 2017/05/12
- [Qemu-devel] [PULL 2/6] usb-redir: fix stack overflow in usbredir_log_data, Gerd Hoffmann, 2017/05/12
- [Qemu-devel] [PULL 3/6] xhci: fix logging, Gerd Hoffmann, 2017/05/12
- [Qemu-devel] [PULL 4/6] usb-hub: clear PORT_STAT_SUSPEND on wakeup,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 1/6] qemu-doc: Update to use the new way of attaching USB devices, Gerd Hoffmann, 2017/05/12
- [Qemu-devel] [PULL 6/6] hw/usb/dev-serial: Do not try to set vendorid or productid properties, Gerd Hoffmann, 2017/05/12
- Re: [Qemu-devel] [PULL 6/6] hw/usb/dev-serial: Do not try to set vendorid or productid properties, Paolo Bonzini, 2017/05/18
- Re: [Qemu-devel] [PULL 6/6] hw/usb/dev-serial: Do not try to set vendorid or productid properties, Thomas Huth, 2017/05/18
- Re: [Qemu-devel] [PULL 6/6] hw/usb/dev-serial: Do not try to set vendorid or productid properties, Paolo Bonzini, 2017/05/18
- Re: [Qemu-devel] [PULL 6/6] hw/usb/dev-serial: Do not try to set vendorid or productid properties, Thomas Huth, 2017/05/18
- Re: [Qemu-devel] [PULL 6/6] hw/usb/dev-serial: Do not try to set vendorid or productid properties, Gerd Hoffmann, 2017/05/18
- Re: [Qemu-devel] [PULL 6/6] hw/usb/dev-serial: Do not try to set vendorid or productid properties, Markus Armbruster, 2017/05/19
- Re: [Qemu-devel] [PULL 6/6] hw/usb/dev-serial: Do not try to set vendorid or productid properties, Thomas Huth, 2017/05/19
[Qemu-devel] [PULL 5/6] xhci: relax link check, Gerd Hoffmann, 2017/05/12