From b8852a24a6c2cceec7b119946207040a551bc566 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 8 Feb 2020 13:36:51 -0500 Subject: [PATCH] XHCI: Do not set "Interrupt Short Packet" on transfers. Before the refactor to use Event Data TRBs, this was necessary to detect short packet conditions. Now that we use Event Data TRBs, the hardware will send us an Event Data event even on Short Packet conditions, so this is redundant. Fixes log spam of "TRB ... not found in the endpoint", as this was causing duplicate event postings. Also potentially fixes instability seen when those messages were present. --- src/add-ons/kernel/busses/usb/xhci.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/xhci.cpp b/src/add-ons/kernel/busses/usb/xhci.cpp index 9fdabb1480..cd1f3f464c 100644 --- a/src/add-ons/kernel/busses/usb/xhci.cpp +++ b/src/add-ons/kernel/busses/usb/xhci.cpp @@ -739,7 +739,7 @@ XHCI::SubmitControlRequest(Transfer *transfer) | TRB_2_BYTES(requestData->Length) | TRB_2_TD_SIZE(0); descriptor->trbs[index].flags = TRB_3_TYPE(TRB_TYPE_DATA_STAGE) - | (directionIn ? (TRB_3_DIR_IN | TRB_3_ISP_BIT) : 0) + | (directionIn ? TRB_3_DIR_IN : 0) | TRB_3_CYCLE_BIT; if (!directionIn) { @@ -832,8 +832,7 @@ XHCI::SubmitNormalRequest(Transfer *transfer) | TRB_2_BYTES(trbLength) | TRB_2_TD_SIZE(tdSize); td->trbs[i].flags = TRB_3_TYPE(TRB_TYPE_NORMAL) - | TRB_3_CYCLE_BIT | TRB_3_CHAIN_BIT - | (directionIn ? TRB_3_ISP_BIT : 0); + | TRB_3_CYCLE_BIT | TRB_3_CHAIN_BIT; td->trb_used++; remaining -= trbLength;