Received: from eggs.gnu.org ([208.118.235.92]:48428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TL86Y-0001oV-59 for qemu-devel@nongnu.org; Mon, 08 Oct 2012 03:50:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TL86W-0006L5-N5 for qemu-devel@nongnu.org; Mon, 08 Oct 2012 03:50:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TL86W-0006Jh-Fz for qemu-devel@nongnu.org; Mon, 08 Oct 2012 03:50:20 -0400 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 q987oJrt007083 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 8 Oct 2012 03:50:19 -0400 From: Hans de Goede Date: Mon, 8 Oct 2012 09:51:33 +0200 Message-Id: <1349682696-3046-10-git-send-email-hdegoede@redhat.com> In-Reply-To: <1349682696-3046-1-git-send-email-hdegoede@redhat.com> References: <1349682696-3046-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH 09/12] ehci: Set int flag on a short input packet List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org According to 4.15.1.2 an interrupt must be raised when a short packet is received. If we don't do this it may take a significant time for the guest to notice a short trasnfer has completed, since only the last td will have its IOC flag set, and a short transfer may complete in an earlier packet. Signed-off-by: Hans de Goede --- hw/usb/hcd-ehci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 6945992..d9d4918 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -1508,6 +1508,10 @@ static void ehci_execute_complete(EHCIQueue *q) if (tbytes && p->pid == USB_TOKEN_IN) { tbytes -= p->usb_status; + if (tbytes) { + /* 4.15.1.2 must raise int on a short input packet */ + ehci_raise_irq(q->ehci, USBSTS_INT); + } } else { tbytes = 0; } -- 1.7.12.1