usb-hub: set PORT_STAT_C_SUSPEND on host-initiated wake-up
commit6361bbc7e21f822823e015e5ccb50d4ac1745b1b
authorLadi Prosek <lprosek@redhat.com>
Mon, 22 May 2017 12:33:25 +0000 (22 14:33 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 29 May 2017 12:17:59 +0000 (29 14:17 +0200)
treed09281dbe15796251bbee565696e5efd0880f7e7
parent2da077a881894c0b18032153c709d95ac89492c6
usb-hub: set PORT_STAT_C_SUSPEND on host-initiated wake-up

PORT_STAT_C_SUSPEND should be set even on host-initiated wake-up,
i.e. on ClearPortFeature(PORT_SUSPEND). Windows is known to not
work properly otherwise.

Side note, since PORT_ENABLE looks similar and might appear to
have the same issue: According to 11.24.2.7.2.2 C_PORT_ENABLE:

  "This bit is set when the PORT_ENABLE bit changes from one to
  zero as a result of a Port Error condition (see Section 11.8.1).
  This bit is not set on any other changes to PORT_ENABLE."

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Message-id: 20170522123325.2199-1-lprosek@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-hub.c