xhci: Fix incorrect TRB offset; solves #13343

* The incorrect offset would result in semaphores timing out

Signed-off-by: Alexander von Gluck IV <kallisti5@unixzen.com>
This commit is contained in:
Greg Crain 2017-11-08 15:11:40 -06:00 committed by Alexander von Gluck IV
parent e344167824
commit c5ea0115b0

View File

@ -2065,7 +2065,7 @@ XHCI::HandleTransferComplete(xhci_trb* trb)
int64 offset = source - td_chain->this_phy;
TRACE("HandleTransferComplete td %p offset %" B_PRId64 " %"
B_PRIxADDR "\n", td_chain, offset, source);
offset = offset / sizeof(xhci_trb);
offset = offset / sizeof(xhci_trb) + 1;
if (offset <= td_chain->trb_count && offset >= 0) {
TRACE("HandleTransferComplete td %p trb %" B_PRId64 " found "
"\n", td_chain, offset);