mirror of https://gitee.com/openkylin/qemu.git
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:
parent
7263da7804
commit
b66ad1f1aa
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue