diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-06-26 17:05:06 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-07-30 10:26:19 +0200 |
commit | 9f0f1a0c096f29a856f2e6903beda45b44ce9cdd (patch) | |
tree | fb26fd867cd8b6c580d74708be19b10d225cc19a /hw/usb/hcd-uhci.c | |
parent | ed60ff024fdb0e7ca9c002af166e10683cf49805 (diff) | |
download | qemu-9f0f1a0c096f29a856f2e6903beda45b44ce9cdd.zip qemu-9f0f1a0c096f29a856f2e6903beda45b44ce9cdd.tar.gz qemu-9f0f1a0c096f29a856f2e6903beda45b44ce9cdd.tar.bz2 |
uhci: egsm fix
When the guest goes suspend the uhci controller while there are
pending resume requests on the ports go signal global resume
instantly.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/hcd-uhci.c')
-rw-r--r-- | hw/usb/hcd-uhci.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index cb44abc..ac82833 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -189,6 +189,7 @@ typedef struct UHCI_QH { static void uhci_async_cancel(UHCIAsync *async); static void uhci_queue_fill(UHCIQueue *q, UHCI_TD *td); +static void uhci_resume(void *opaque); static inline int32_t uhci_queue_token(UHCI_TD *td) { @@ -498,6 +499,12 @@ static void uhci_port_write(void *opaque, hwaddr addr, return; } s->cmd = val; + if (val & UHCI_CMD_EGSM) { + if ((s->ports[0].ctrl & UHCI_PORT_RD) || + (s->ports[1].ctrl & UHCI_PORT_RD)) { + uhci_resume(s); + } + } break; case 0x02: s->status &= ~val; |