From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWkXS-0005xm-8t for qemu-devel@nongnu.org; Fri, 09 Nov 2012 04:06:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TWkXD-0001CR-Od for qemu-devel@nongnu.org; Fri, 09 Nov 2012 04:06:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWkXD-0001By-GI for qemu-devel@nongnu.org; Fri, 09 Nov 2012 04:05:55 -0500 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 qA995sJi005108 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 9 Nov 2012 04:05:55 -0500 From: Gerd Hoffmann Date: Fri, 9 Nov 2012 10:05:48 +0100 Message-Id: <1352451951-9407-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1352451951-9407-1-git-send-email-kraxel@redhat.com> References: <1352451951-9407-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 5/8] xhci: Add support for packets with both data and an error status 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 Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index d4a2e0c..a181d45 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -1388,7 +1388,7 @@ static void xhci_xfer_report(XHCITransfer *xfer) XHCIState *xhci = xfer->xhci; int i; - left = xfer->packet.status ? 0 : xfer->packet.actual_length; + left = xfer->packet.actual_length; for (i = 0; i < xfer->trb_count; i++) { XHCITRB *trb = &xfer->trbs[i]; @@ -1416,7 +1416,7 @@ static void xhci_xfer_report(XHCITransfer *xfer) if (!reported && ((trb->control & TRB_TR_IOC) || (shortpkt && (trb->control & TRB_TR_ISP)) || - (xfer->status != CC_SUCCESS))) { + (xfer->status != CC_SUCCESS && left == 0))) { event.slotid = xfer->slotid; event.epid = xfer->epid; event.length = (trb->status & 0x1ffff) - chunk; -- 1.7.1