From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0YmH-0003Pz-SH for qemu-devel@nongnu.org; Thu, 23 Feb 2012 08:32:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0YmD-0001XW-UF for qemu-devel@nongnu.org; Thu, 23 Feb 2012 08:32:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0YmD-0001XO-MD for qemu-devel@nongnu.org; Thu, 23 Feb 2012 08:32:05 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1NDW41s010102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 23 Feb 2012 08:32:04 -0500 From: Gerd Hoffmann Date: Thu, 23 Feb 2012 14:32:03 +0100 Message-Id: <1330003923-4827-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] ehci: fix reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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 --- hw/usb-ehci.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index 6c01ca9..b908732 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -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 */ -- 1.7.1