提交 81d37739 编写于 作者: G Gerd Hoffmann

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: NGerd Hoffmann <kraxel@redhat.com>
上级 299aa1c6
...@@ -912,6 +912,7 @@ static void ehci_reset(void *opaque) ...@@ -912,6 +912,7 @@ static void ehci_reset(void *opaque)
} }
} }
ehci_queues_rip_all(s); ehci_queues_rip_all(s);
qemu_del_timer(s->frame_timer);
} }
static uint32_t ehci_mem_readb(void *ptr, target_phys_addr_t addr) 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) ...@@ -1070,7 +1071,7 @@ static void ehci_mem_writel(void *ptr, target_phys_addr_t addr, uint32_t val)
if (val & USBCMD_HCRESET) { if (val & USBCMD_HCRESET) {
ehci_reset(s); ehci_reset(s);
val &= ~USBCMD_HCRESET; val = s->usbcmd;
} }
/* not supporting dynamic frame list size at the moment */ /* not supporting dynamic frame list size at the moment */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册