Skip to contentSkip to conversation

xhci: Add check for invalid byte size error when UAS devices are connected.

PATCH In review Sandeep Singh 3 participants 3 messages Sep 21, 2018 – Sep 25, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xhci: Add check for invalid byte size error when UAS devices are connected.

From: Sandeep Singh <[email protected]>

Observed "TRB completion code (27)" error which corresponds to Stopped - Length Invalid error(xhci spec section 4.17.4) while connecting USB to SATA bridge.

Looks like this case was not considered when the following patch[1] was committed. Hence adding this new check which can prevent
the invalid byte size error.

[1] ade2e3a xhci: handle transfer events without TRB pointer

cc Nehal Shah <[email protected]>
cc Shyam Sundar S K <[email protected]>
---
 drivers/usb/host/xhci-ring.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/xhci-ring.c +1 -0
index f0a99aa..8ba2cbc 100644
@@ -2246,6 +2246,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
 			goto cleanup;
 		case COMP_RING_UNDERRUN:
 		case COMP_RING_OVERRUN:
+		case COMP_STOPPED_LENGTH_INVALID:
 			goto cleanup;
 		default:
 			xhci_err(xhci, "ERROR Transfer event for unknown stream ring slot %u ep %u\n",
#1 lore raw
Quoted 6 lines · Sandeep Singh

From: Sandeep Singh <[email protected]>

Observed "TRB completion code (27)" error which corresponds to Stopped - Length Invalid error(xhci spec section 4.17.4) while connecting USB to SATA bridge.

Quoted 6 lines

Looks like this case was not considered when the following patch[1] was committed. Hence adding this new check which can prevent
the invalid byte size error.

[1] ade2e3a xhci: handle transfer events without TRB pointer

Thanks, adding to queue.

Just out of curiosity, was the TRB pointer bits all zeroes in this Stopped -Length invalid transfer event TRB?

-Mathias

#2 lore raw
Quoted 11 lines · Mathias Nyman
Quoted 10 lines · Sandeep Singh

From: Sandeep Singh <[email protected]>

Observed "TRB completion code (27)" error which corresponds to Stopped - Length Invalid error(xhci spec section 4.17.4) while connecting USB to SATA bridge.

Looks like this case was not considered when the following patch[1] was committed. Hence adding this new check which can prevent
the invalid byte size error.

Quoted 8 lines
Quoted 2 lines

[1] ade2e3a xhci: handle transfer events without TRB pointer

Thanks, adding to queue.

Just out of curiosity, was the TRB pointer bits all zeroes in this Stopped -Length invalid transfer event TRB?

Yes, TRB pointer bits all zeroes

Quoted 2 lines

-Mathias

Thanks
Sandeep