XHCI: Print errors when transfers have non-success completion codes.

This commit is contained in:
Augustin Cavalier 2019-07-14 14:37:00 -04:00
parent 9cd2907d68
commit 553ff67585

View File

@ -2380,11 +2380,16 @@ XHCI::HandleTransferComplete(xhci_trb* trb)
(flags & TRB_3_EVENT_DATA_BIT), completionCode, transferred);
if ((flags & TRB_3_EVENT_DATA_BIT) == 0) {
TRACE_ALWAYS("got an interrupt for a non-Event Data TRB!\n");
TRACE("got an interrupt for a non-Event Data TRB!\n");
remainder = transferred;
transferred = -1;
}
if (completionCode != COMP_SUCCESS && completionCode != COMP_SHORT_PACKET) {
TRACE_ALWAYS("transfer error on slot %" B_PRId8 " endpoint %" B_PRId8
": %s\n", slot, endpointNumber, xhci_error_string(completionCode));
}
const phys_addr_t source = B_LENDIAN_TO_HOST_INT64(trb->address);
for (xhci_td *td = endpoint->td_head; td != NULL; td = td->next) {
int64 offset = (source - td->trb_addr) / sizeof(xhci_trb);