summaryrefslogtreecommitdiffstats
path: root/hw/usb-uhci.c
diff options
context:
space:
mode:
authorGleb Natapov2009-06-17 18:32:02 +0200
committerBlue Swirl2009-06-17 19:05:31 +0200
commitc8075ac370e08190271ed7b6b1b81e45160d4c2b (patch)
tree0218d08ade9fc04d6cf0b25883307437f68bedff /hw/usb-uhci.c
parentRevert "Update irqs on reset and device load" (diff)
downloadqemu-c8075ac370e08190271ed7b6b1b81e45160d4c2b.tar.gz
qemu-c8075ac370e08190271ed7b6b1b81e45160d4c2b.tar.xz
qemu-c8075ac370e08190271ed7b6b1b81e45160d4c2b.zip
Register usb-uhci reset function.
The device is not reset on system reset currently. Without this patch RHEL4.8 hangs after reboot if -usbdevice table is in use. Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'hw/usb-uhci.c')
-rw-r--r--hw/usb-uhci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index 00e740b47d..ea83bdc3ee 100644
--- a/hw/usb-uhci.c
+++ b/hw/usb-uhci.c
@@ -319,8 +319,9 @@ static void uhci_update_irq(UHCIState *s)
qemu_set_irq(s->dev.irq[3], level);
}
-static void uhci_reset(UHCIState *s)
+static void uhci_reset(void *opaque)
{
+ UHCIState *s = opaque;
uint8_t *pci_conf;
int i;
UHCIPort *port;
@@ -1093,6 +1094,7 @@ void usb_uhci_piix3_init(PCIBus *bus, int devfn)
}
s->frame_timer = qemu_new_timer(vm_clock, uhci_frame_timer, s);
+ qemu_register_reset(uhci_reset, 0, s);
uhci_reset(s);
/* Use region 4 for consistency with real hardware. BSD guests seem
@@ -1127,6 +1129,7 @@ void usb_uhci_piix4_init(PCIBus *bus, int devfn)
}
s->frame_timer = qemu_new_timer(vm_clock, uhci_frame_timer, s);
+ qemu_register_reset(uhci_reset, 0, s);
uhci_reset(s);
/* Use region 4 for consistency with real hardware. BSD guests seem