Received: from eggs.gnu.org ([208.118.235.92]:49870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTXtc-0003zk-Vd for qemu-devel@nongnu.org; Wed, 31 Oct 2012 08:59:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTXtV-0002D8-8D for qemu-devel@nongnu.org; Wed, 31 Oct 2012 08:59:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTXtV-0002Cq-0I for qemu-devel@nongnu.org; Wed, 31 Oct 2012 08:59:41 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9VCxe24023441 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 31 Oct 2012 08:59:40 -0400 From: Hans de Goede Date: Wed, 31 Oct 2012 14:01:18 +0100 Message-Id: <1351688478-14541-6-git-send-email-hdegoede@redhat.com> In-Reply-To: <1351688478-14541-1-git-send-email-hdegoede@redhat.com> References: <1351688478-14541-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH 5/5] 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: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 16c2a86..f670c29 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -1363,7 +1363,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]; @@ -1391,7 +1391,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.12.1