* [Qemu-devel] [PATCH] uhci: egsm fix
@ 2013-07-26 9:56 Gerd Hoffmann
0 siblings, 0 replies; only message in thread
From: Gerd Hoffmann @ 2013-07-26 9:56 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
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>
---
hw/usb/hcd-uhci.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index 066072e..b93d3ae 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;
--
1.7.9.7
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-26 9:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-26 9:56 [Qemu-devel] [PATCH] uhci: egsm fix Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).