From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpZdY-0000Nd-RW for qemu-devel@nongnu.org; Tue, 05 May 2015 05:59:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpZdV-0000Hv-2t for qemu-devel@nongnu.org; Tue, 05 May 2015 05:59:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpZdU-0000He-S4 for qemu-devel@nongnu.org; Tue, 05 May 2015 05:59:33 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t459xWNq018760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 5 May 2015 05:59:32 -0400 From: Gerd Hoffmann Date: Tue, 5 May 2015 11:59:12 +0200 Message-Id: <1430819953-12931-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1430819953-12931-1-git-send-email-kraxel@redhat.com> References: <1430819953-12931-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] Revert "xhci: generate a Transfer Event for each Transfer TRB with the IOC bit set" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lersek@redhat.com, Gerd Hoffmann This makes xhci generate multiple short packet events in case of multi-trb transfers. Which is wrong. We need to fix this in a different way. This reverts commit aa6857891df614c620e6e9fc4bc4af6e0e49cafd. --- hw/usb/hcd-xhci.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 2af3dd6..39aacf7 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -1767,18 +1767,9 @@ static void xhci_xfer_report(XHCITransfer *xfer) break; } - /* - * XHCI 1.1, 4.11.3.1 Transfer Event TRB -- "each Transfer TRB - * encountered with its IOC flag set to '1' shall generate a Transfer - * Event." - * - * Otherwise, longer transfers can have multiple data TRBs (for scatter - * gather). Short transfers and errors should be reported once per - * transfer only. - */ - if ((trb->control & TRB_TR_IOC) || - (!reported && ((shortpkt && (trb->control & TRB_TR_ISP)) || - (xfer->status != CC_SUCCESS && left == 0)))) { + if (!reported && ((trb->control & TRB_TR_IOC) || + (shortpkt && (trb->control & TRB_TR_ISP)) || + (xfer->status != CC_SUCCESS && left == 0))) { event.slotid = xfer->slotid; event.epid = xfer->epid; event.length = (trb->status & 0x1ffff) - chunk; -- 1.8.3.1