diff mbox series

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

Message ID 1537536150-11721-1-git-send-email-Sandeep.Singh@amd.com (mailing list archive)
State New, archived
Headers show
Series xhci: Add check for invalid byte size error when UAS devices are connected. | expand

Commit Message

Sandeep Singh Sept. 21, 2018, 1:22 p.m. UTC
From: Sandeep Singh <sandeep.singh@amd.com>

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

Signed-off-by: Sandeep Singh <sandeep.singh@amd.com>
cc: Nehal Shah <Nehal-bakulchandra.Shah@amd.com>
cc: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
---
 drivers/usb/host/xhci-ring.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mathias Nyman Sept. 24, 2018, 1:09 p.m. UTC | #1
On 21.09.2018 16:22, Sandeep Singh wrote:
> From: Sandeep Singh <sandeep.singh@amd.com>
> 
> 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
> 

Thanks, adding to queue.

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

-Mathias
Singh, Sandeep Sept. 25, 2018, 9:14 a.m. UTC | #2
On 9/24/2018 6:39 PM, Mathias Nyman wrote:
> On 21.09.2018 16:22, Sandeep Singh wrote:
>> From: Sandeep Singh <sandeep.singh@amd.com>
>>
>> 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
>>
> 
> 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

> -Mathias
> 
Thanks
Sandeep
diff mbox series

Patch

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index f0a99aa..8ba2cbc 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -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",