diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-10-16 19:52:18 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2012-11-04 15:47:39 +0100 |
commit | b09ad29db6ff34bc74f77e88078d21bd7fe30c9f (patch) | |
tree | b6b34c66ab59a021d5f5791a7be7c43137473680 | |
parent | 068cc0d5653afa5a2c89fa7eaa97128695204145 (diff) |
xhci: Add support for packets with both data and an error status
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | 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 16c2a868f..f670c2900 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; |