From patchwork Fri Nov 9 09:05:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 198001 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 126642C00B5 for ; Fri, 9 Nov 2012 20:33:09 +1100 (EST) Received: from localhost ([::1]:57690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWkYE-0006uj-C1 for incoming@patchwork.ozlabs.org; Fri, 09 Nov 2012 04:06:58 -0500 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 Received: from rincewind.home.kraxel.org (ovpn-116-66.ams2.redhat.com [10.36.116.66]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qA995rP5005262; Fri, 9 Nov 2012 04:05:53 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id B98B440311; Fri, 9 Nov 2012 10:05:51 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Hans de Goede , Gerd Hoffmann Subject: [Qemu-devel] [PATCH 5/8] xhci: Add support for packets with both data and an error status X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;