From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOqiB-0005RG-BI for qemu-devel@nongnu.org; Thu, 18 Oct 2012 10:04:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOqi3-0001oq-FV for qemu-devel@nongnu.org; Thu, 18 Oct 2012 10:04:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOqi3-0001od-7E for qemu-devel@nongnu.org; Thu, 18 Oct 2012 10:04:27 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9IE4Q0h014199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Oct 2012 10:04:26 -0400 From: Hans de Goede Date: Thu, 18 Oct 2012 16:05:56 +0200 Message-Id: <1350569156-2565-5-git-send-email-hdegoede@redhat.com> In-Reply-To: <1350569156-2565-1-git-send-email-hdegoede@redhat.com> References: <1350569156-2565-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH 4/4] 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 ffba6de..1f82223 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -1356,7 +1356,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]; @@ -1384,7 +1384,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