From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqgjE-0008K6-Kq for qemu-devel@nongnu.org; Fri, 08 May 2015 07:46:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqgjA-0007kI-W4 for qemu-devel@nongnu.org; Fri, 08 May 2015 07:46:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqgjA-0007jq-9A for qemu-devel@nongnu.org; Fri, 08 May 2015 07:46:00 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t48BjxjH029525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 8 May 2015 07:45:59 -0400 From: Gerd Hoffmann Date: Fri, 8 May 2015 13:45:37 +0200 Message-Id: <1431085553-6055-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1431085553-6055-1-git-send-email-kraxel@redhat.com> References: <1431085553-6055-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 03/19] 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: 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. Signed-off-by: Gerd Hoffmann --- 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