From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OBIn9-0001iA-5e for qemu-devel@nongnu.org; Sun, 09 May 2010 22:32:23 -0400 Received: from [140.186.70.92] (port=45605 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBIn4-0001hp-82 for qemu-devel@nongnu.org; Sun, 09 May 2010 22:32:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBImx-0002Ot-9E for qemu-devel@nongnu.org; Sun, 09 May 2010 22:32:18 -0400 Received: from izumi-v2.palats.com ([91.121.80.203]:58763 helo=izumi.palats.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBImx-0002OZ-40 for qemu-devel@nongnu.org; Sun, 09 May 2010 22:32:11 -0400 From: Vincent Palatin Date: Mon, 10 May 2010 04:32:07 +0200 Message-Id: <1273458728-24918-2-git-send-email-vincent.palatin_qemu@m4x.org> In-Reply-To: <1273458728-24918-1-git-send-email-vincent.palatin_qemu@m4x.org> References: <1273458728-24918-1-git-send-email-vincent.palatin_qemu@m4x.org> Subject: [Qemu-devel] [PATCH 1/2] ehci: Fix error detection when registering a new list base address List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Vincent Palatin , Jan Kiszka , David Ahern We must check against the current running command not the list address. Signed-off-by: Vincent Palatin --- hw/usb-ehci.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index 8be0780..e724653 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -774,7 +774,7 @@ static void ehci_mem_writel(void *ptr, target_phys_addr_t addr, uint32_t val) break; case PERIODICLISTBASE: - if (val & USBCMD_PSE) { + if (s->usbcmd & USBCMD_PSE) { fprintf(stderr, "Guest OS should not be setting the periodic" " list base register while periodic schedule is enabled\n"); return; @@ -783,7 +783,7 @@ static void ehci_mem_writel(void *ptr, target_phys_addr_t addr, uint32_t val) break; case ASYNCLISTADDR: - if (val & USBCMD_ASE) { + if (s->usbcmd & USBCMD_ASE) { fprintf(stderr, "Guest OS should not be setting the async list" " address register while async schedule is enabled\n"); return; -- 1.5.6.5