Below Note in xHCI spec 6.4.2.1 describes a Transfer Event is generated for Stop Endpoint Command on invalid CStream: CStream is not valid until a Streams endpoint transitions to the Start Stream state for the first time. A Transfer Event generated by a Stop Endpoint Command shall report '0' in the TRB Pointer and TRB Length fields if the command is executed and CStream is invalid. Refer to section 4.12.1. But, current implementation will output below error messages once driver receives the Transfer Event for invalid CStream: [ 133.184633] xhci_hcd 0000:01:00.2: ERROR Transfer event for unknown stream ring slot 1 ep 2 [ 133.184635] xhci_hcd 0000:01:00.2: @000000046044a420 00000000 00000000 1b000000 01038001 This issue can be observed while uas driver is handling SCSI command that connected UAS device doesn't support. UAS device rejects the unsupported command and causes Data-In stream for SCSI command data stopped when CStream is invalid. This patch handles the transfer event to remove false error messages. Signed-off-by: Henry Lin <henryl@xxxxxxxxxx> --- drivers/usb/host/xhci-ring.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index a8d92c9..8ae658e 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -2267,6 +2267,11 @@ static int handle_tx_event(struct xhci_hcd *xhci, case COMP_RING_UNDERRUN: case COMP_RING_OVERRUN: goto cleanup; + case COMP_STOPPED_LENGTH_INVALID: + if ((ep->ep_state & EP_HAS_STREAMS) && + (event->buffer == 0)) + goto cleanup; + /* else fall through */ default: xhci_err(xhci, "ERROR Transfer event for unknown stream ring slot %u ep %u\n", slot_id, ep_index); -- 2.7.4