|
Hans de Goede |
1b1995 |
From 21946e621f14553b72cde7fae221ae390a427eac Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
1b1995 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
1b1995 |
Date: Thu, 23 Feb 2012 13:24:00 +0000
|
|
Hans de Goede |
1b1995 |
Subject: [PATCH 139/140] usb-ehci: fix reset
|
|
Hans de Goede |
1b1995 |
|
|
Hans de Goede |
1b1995 |
Two reset fixes:
|
|
Hans de Goede |
1b1995 |
* pick up s->usbcmd value after ehci_reset call to make sure it
|
|
Hans de Goede |
1b1995 |
keeps the reset value and doesn't get rubbish filled in when
|
|
Hans de Goede |
1b1995 |
val is written back to the mmio register array later on.
|
|
Hans de Goede |
1b1995 |
* make sure the frame timer is zapped on reset.
|
|
Hans de Goede |
1b1995 |
|
|
Hans de Goede |
1b1995 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
1b1995 |
---
|
|
Hans de Goede |
1b1995 |
hw/usb-ehci.c | 3 ++-
|
|
Hans de Goede |
1b1995 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
Hans de Goede |
1b1995 |
|
|
Hans de Goede |
1b1995 |
diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c
|
|
Hans de Goede |
1b1995 |
index ba1b9da..ad0f6e1 100644
|
|
Hans de Goede |
1b1995 |
--- a/hw/usb-ehci.c
|
|
Hans de Goede |
1b1995 |
+++ b/hw/usb-ehci.c
|
|
Hans de Goede |
1b1995 |
@@ -900,6 +900,7 @@ static void ehci_reset(void *opaque)
|
|
Hans de Goede |
1b1995 |
}
|
|
Hans de Goede |
1b1995 |
ehci_queues_rip_all(s, 0);
|
|
Hans de Goede |
1b1995 |
ehci_queues_rip_all(s, 1);
|
|
Hans de Goede |
1b1995 |
+ qemu_del_timer(s->frame_timer);
|
|
Hans de Goede |
1b1995 |
}
|
|
Hans de Goede |
1b1995 |
|
|
Hans de Goede |
1b1995 |
static uint32_t ehci_mem_readb(void *ptr, target_phys_addr_t addr)
|
|
Hans de Goede |
1b1995 |
@@ -1059,7 +1060,7 @@ static void ehci_mem_writel(void *ptr, target_phys_addr_t addr, uint32_t val)
|
|
Hans de Goede |
1b1995 |
|
|
Hans de Goede |
1b1995 |
if (val & USBCMD_HCRESET) {
|
|
Hans de Goede |
1b1995 |
ehci_reset(s);
|
|
Hans de Goede |
1b1995 |
- val &= ~USBCMD_HCRESET;
|
|
Hans de Goede |
1b1995 |
+ val = s->usbcmd;
|
|
Hans de Goede |
1b1995 |
}
|
|
Hans de Goede |
1b1995 |
|
|
Hans de Goede |
1b1995 |
/* not supporting dynamic frame list size at the moment */
|
|
Hans de Goede |
1b1995 |
--
|
|
Hans de Goede |
1b1995 |
1.7.9.3
|
|
Hans de Goede |
1b1995 |
|