summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-02-23 14:24:00 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-02-27 11:13:26 +0100
commit81d37739dfded2ebd992f3bf8ae5d6cb1a0558cc (patch)
tree872014a8b645e190e5d74248bff3501903320762 /hw
parent299aa1c6df1a308cc4d49666e7eb75655c0d40ce (diff)
downloadqemu-81d37739dfded2ebd992f3bf8ae5d6cb1a0558cc.zip
usb-ehci: fix reset
Two reset fixes: * pick up s->usbcmd value after ehci_reset call to make sure it keeps the reset value and doesn't get rubbish filled in when val is written back to the mmio register array later on. * make sure the frame timer is zapped on reset. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/usb-ehci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c
index e699814305..b9da26ada8 100644
--- a/hw/usb-ehci.c
+++ b/hw/usb-ehci.c
@@ -912,6 +912,7 @@ static void ehci_reset(void *opaque)
}
}
ehci_queues_rip_all(s);
+ qemu_del_timer(s->frame_timer);
}
static uint32_t ehci_mem_readb(void *ptr, target_phys_addr_t addr)
@@ -1070,7 +1071,7 @@ static void ehci_mem_writel(void *ptr, target_phys_addr_t addr, uint32_t val)
if (val & USBCMD_HCRESET) {
ehci_reset(s);
- val &= ~USBCMD_HCRESET;
+ val = s->usbcmd;
}
/* not supporting dynamic frame list size at the moment */