aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/hcd-uhci.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-07-30 18:48:54 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-07-30 18:48:54 -0500
commitc095e108473f57516e7ad958d905a7017b225f82 (patch)
treecf5eafa5712103a17c672072a42d5941238e2a58 /hw/usb/hcd-uhci.c
parentdbef7b17ad1d0be90696dc45b5b8162d8208643f (diff)
parentcf66ee8e207d5c1831c7d4d8c7f2544314fc676c (diff)
Merge remote-tracking branch 'kraxel/usb.85' into staging
# By Gerd Hoffmann (2) and Alexey Kardashevskiy (1) # Via Gerd Hoffmann * kraxel/usb.85: hcd-ohci: add dma error handling uhci: egsm fix xhci: handle USB_RET_IOERROR Message-id: 1375173371-3378-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/usb/hcd-uhci.c')
-rw-r--r--hw/usb/hcd-uhci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index cb44abc7bc..ac8283313e 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;