Signed-off-by: liguang <lig.f...@cn.fujitsu.com> --- hw/usb/hcd-uhci.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index f8c4286..008f567 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -414,6 +414,14 @@ static void uhci_reset(void *opaque) uhci_update_irq(s); } +static void uhci_dev_reset(DeviceState *dev) +{ + PCIDevice *pdev = PCI_DEVICE(dev); + UHCIState *s = container_of(pdev, UHCIState, dev); + + uhci_reset(s); +} + static const VMStateDescription vmstate_uhci_port = { .name = "uhci port", .version_id = 1, @@ -1307,6 +1315,8 @@ static void uhci_class_init(ObjectClass *klass, void *data) k->class_id = PCI_CLASS_SERIAL_USB; k->no_hotplug = 1; dc->vmsd = &vmstate_uhci; + dc->reset = uhci_dev_reset; + dc->on = uhci_dev_reset; dc->props = uhci_properties; u->info = *info; } -- 1.7.2.5