Index: qemu-snapshot-2007-02-09_05/hw/usb-ohci.c =================================================================== --- qemu-snapshot-2007-02-09_05.orig/hw/usb-ohci.c +++ qemu-snapshot-2007-02-09_05/hw/usb-ohci.c @@ -106,6 +106,8 @@ struct ohci_hcca { uint32_t done; }; +static void ohci_bus_stop(OHCIState *ohci); + /* Bitfields for the first word of an Endpoint Desciptor. */ #define OHCI_ED_FA_SHIFT 0 #define OHCI_ED_FA_MASK (0x7f<ctl = 0; ohci->old_ctl = 0; ohci->status = 0; @@ -813,6 +817,7 @@ static void ohci_bus_stop(OHCIState *ohc { if (ohci->eof_timer) qemu_del_timer(ohci->eof_timer); + ohci->eof_timer = NULL; } /* Sets a flag in a port status register but only set it if the port is @@ -898,6 +903,7 @@ static void ohci_set_ctl(OHCIState *ohci dprintf("usb-ohci: %s: USB Resume\n", ohci->pci_dev.name); break; case OHCI_USB_RESET: + ohci_reset(ohci); dprintf("usb-ohci: %s: USB Reset\n", ohci->pci_dev.name); break; } @@ -1266,5 +1272,6 @@ void usb_ohci_init(struct PCIBus *bus, i } ohci->async_td = 0; + qemu_register_reset(ohci_reset, ohci); ohci_reset(ohci); }