xhci: Fix remainder field for TR_SETUP completion event.

Previously the code would incorrectly report the remainder as 8 bytes. A
remainder of 0 bytes should be reported when the SETUP packet is
successfully transferred. Found using FreeBSD's XHCI driver.

Signed-off-by: Hans Petter Selasky <hps@selasky.org>

[ kraxel: codestyle fixup ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Hans Petter Selasky 2016-08-23 13:39:49 +02:00 committed by Gerd Hoffmann
parent 7263da7804
commit b66ad1f1aa
1 changed files with 6 additions and 0 deletions

View File

@ -1753,6 +1753,12 @@ static void xhci_xfer_report(XHCITransfer *xfer)
unsigned int chunk = 0;
switch (TRB_TYPE(*trb)) {
case TR_SETUP:
chunk = trb->status & 0x1ffff;
if (chunk > 8) {
chunk = 8;
}
break;
case TR_DATA:
case TR_NORMAL:
case TR_ISOCH: