Skip to content

Commit

Permalink
Revert "xhci: generate a Transfer Event for each Transfer TRB with th…
Browse files Browse the repository at this point in the history
…e IOC bit set"

This makes xhci generate multiple short packet events in case of
multi-trb transfers.  Which is wrong.  We need to fix this in a
different way.

This reverts commit aa68578.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  • Loading branch information
kraxel committed May 8, 2015
1 parent 4e8cfbe commit 88dbed3
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions hw/usb/hcd-xhci.c
Expand Up @@ -1767,18 +1767,9 @@ static void xhci_xfer_report(XHCITransfer *xfer)
break;
}

/*
* XHCI 1.1, 4.11.3.1 Transfer Event TRB -- "each Transfer TRB
* encountered with its IOC flag set to '1' shall generate a Transfer
* Event."
*
* Otherwise, longer transfers can have multiple data TRBs (for scatter
* gather). Short transfers and errors should be reported once per
* transfer only.
*/
if ((trb->control & TRB_TR_IOC) ||
(!reported && ((shortpkt && (trb->control & TRB_TR_ISP)) ||
(xfer->status != CC_SUCCESS && left == 0)))) {
if (!reported && ((trb->control & TRB_TR_IOC) ||
(shortpkt && (trb->control & TRB_TR_ISP)) ||
(xfer->status != CC_SUCCESS && left == 0))) {
event.slotid = xfer->slotid;
event.epid = xfer->epid;
event.length = (trb->status & 0x1ffff) - chunk;
Expand Down

0 comments on commit 88dbed3

Please sign in to comment.