mirror of
https://github.com/qemu/qemu.git
synced 2024-11-29 23:03:41 +08:00
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>
This commit is contained in:
parent
299aa1c6df
commit
81d37739df
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user