mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 03:59:52 +00:00
xhci: Add support for packets with both data and an error status
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
e696b1da42
commit
9b8251c5c4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user