From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 2/3] uhci: egsm fix
Date: Tue, 30 Jul 2013 10:36:10 +0200 [thread overview]
Message-ID: <1375173371-3378-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1375173371-3378-1-git-send-email-kraxel@redhat.com>
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 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;
--
1.7.9.7
next prev parent reply other threads:[~2013-07-30 8:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 8:36 [Qemu-devel] [PULL for-1.6 0/3] usb patch queu Gerd Hoffmann
2013-07-30 8:36 ` [Qemu-devel] [PATCH 1/3] xhci: handle USB_RET_IOERROR Gerd Hoffmann
2013-07-30 8:36 ` Gerd Hoffmann [this message]
2013-07-30 8:36 ` [Qemu-devel] [PATCH 3/3] hcd-ohci: add dma error handling Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1375173371-3378-3-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).