From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGy3Z-000868-JS for qemu-devel@nongnu.org; Wed, 17 Jun 2009 12:32:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGy3T-0007xM-LF for qemu-devel@nongnu.org; Wed, 17 Jun 2009 12:32:12 -0400 Received: from [199.232.76.173] (port=41028 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGy3S-0007wi-RK for qemu-devel@nongnu.org; Wed, 17 Jun 2009 12:32:06 -0400 Received: from mx2.redhat.com ([66.187.237.31]:32769) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGy3S-0008Jm-26 for qemu-devel@nongnu.org; Wed, 17 Jun 2009 12:32:06 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5HGW4iE031537 for ; Wed, 17 Jun 2009 12:32:04 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5HGW4Cf014534 for ; Wed, 17 Jun 2009 12:32:04 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5HGW3eb020694 for ; Wed, 17 Jun 2009 12:32:03 -0400 From: Gleb Natapov Date: Wed, 17 Jun 2009 19:32:02 +0300 Message-Id: <1245256322-30990-3-git-send-email-gleb@redhat.com> In-Reply-To: <1245256322-30990-1-git-send-email-gleb@redhat.com> References: <1245256322-30990-1-git-send-email-gleb@redhat.com> Subject: [Qemu-devel] [PATCH 3/3] Register usb-uhci reset function. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- hw/usb-uhci.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 00e740b..ea83bdc 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 -- 1.6.2.1