Received: from eggs.gnu.org ([208.118.235.92]:37095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR3qM-0008Nu-9Q for qemu-devel@nongnu.org; Wed, 24 Oct 2012 12:30:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR3qD-0002I6-7i for qemu-devel@nongnu.org; Wed, 24 Oct 2012 12:30:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR3qC-0002Hx-Um for qemu-devel@nongnu.org; Wed, 24 Oct 2012 12:30:01 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9OGU0Vd028362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 24 Oct 2012 12:30:00 -0400 From: Hans de Goede Date: Wed, 24 Oct 2012 18:31:17 +0200 Message-Id: <1351096280-9518-15-git-send-email-hdegoede@redhat.com> In-Reply-To: <1351096280-9518-1-git-send-email-hdegoede@redhat.com> References: <1351096280-9518-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH 14/17] uhci: When the guest marks a pending td non-active, cancel the queue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index c4f2f98..592ad8d 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -821,6 +821,10 @@ static int uhci_handle_td(UHCIState *s, UHCIQueue *q, uint32_t qh_addr, /* Is active ? */ if (!(td->ctrl & TD_CTRL_ACTIVE)) { + if (async) { + /* Guest marked a pending td non-active, cancel the queue */ + uhci_queue_free(async->queue, "pending td non-active"); + } /* * ehci11d spec page 22: "Even if the Active bit in the TD is already * cleared when the TD is fetched ... an IOC interrupt is generated" -- 1.7.12.1