From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRMvB-0006px-69 for qemu-devel@nongnu.org; Thu, 25 Oct 2012 08:52:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRMuz-00039E-4B for qemu-devel@nongnu.org; Thu, 25 Oct 2012 08:52:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRMuy-00038o-RU for qemu-devel@nongnu.org; Thu, 25 Oct 2012 08:52:13 -0400 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 q9PCqBJY032142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Oct 2012 08:52:11 -0400 From: Gerd Hoffmann Date: Thu, 25 Oct 2012 14:51:37 +0200 Message-Id: <1351169529-10799-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1351169529-10799-1-git-send-email-kraxel@redhat.com> References: <1351169529-10799-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 04/36] ehci: Set int flag on a short input packet List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Hans de Goede , Gerd Hoffmann From: Hans de Goede 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 Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 82f4dbd..8b4e3c8 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.1