From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2KAj-0006a5-8i for qemu-devel@nongnu.org; Tue, 28 Feb 2012 05:20:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2KAc-0003yv-PY for qemu-devel@nongnu.org; Tue, 28 Feb 2012 05:20:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2KAc-0003yN-Il for qemu-devel@nongnu.org; Tue, 28 Feb 2012 05:20:34 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1SAKWFV006224 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 28 Feb 2012 05:20:32 -0500 From: Gerd Hoffmann Date: Tue, 28 Feb 2012 11:20:11 +0100 Message-Id: <1330424430-23015-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1330424430-23015-1-git-send-email-kraxel@redhat.com> References: <1330424430-23015-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 02/21] usb-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 e699814..b9da26a 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