Comment 257 for bug 1667750

Revision history for this message
In , mathias.nyman (mathias.nyman-linux-kernel-bugs) wrote :

Michael, I've been looking at the traces and can't find anything xhci related in your logs that could cause this. xhci isn't dying, crashig or causing other drivers to crash in the above logs either. It doesn't seem related to Bernhards case.

Have you tried bisecting what patch causes the problems between 4.19 and 4.20 kernels?

The "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state" is related to unplugging of the device. In short, while unplugging the device we get a transaction error for each running endpoint before the hub thread notices the disconnect, so xhci driver tries to recover the endpoint before everything is tore down and returned for the device. It's should be harmless at this stage.

There are several disconnect events initiated by device, or then actual physical
disconnect, could be related to firmware loading?

Traces also show many bulk-in urbs being queued but none completed until cancel at disconnect. so we are waiting 49 seconds to get data from the device before disconnect.

URB b2383f4 TRB is queued from ep4in, waiting for data from device:

  13714.468994: xhci_urb_enqueue: ep4in-bulk: urb 000000000b2383f4 pipe 3221360512 slot 14 length 0/4096 sgs 1/1 stream 0 flags 00040200
  13714.468996: xhci_queue_trb: BULK: Buffer 00000000ff5df000 length 4096 TD size 0 intr 0 type 'Normal' flags b:i:I:c:s:I:e:c
  13714.468996: xhci_inc_enq: BULK 0000000096dfdec9: enq 0x00000000feaec010(0x00000000feaec000) deq 0x00000000feaec000(0x00000000feaec000) segs 2 stream 0 free_trbs 508 bounce 512\

49 seconds later transaction error on ep4in on disconnect:

   13763.472759: xhci_handle_event: EVENT: TRB 00000000feaec000 status 'USB Transaction Error' len 4096 slot 14 ep 9 type 'Transfer Event' flags e:c
   ...
   13763.472787: xhci_handle_event: EVENT: TRB 000000000a000000 status 'Success' len 0 slot 0 ep 0 type 'Port Status Change Event' flags e:c
   13763.472792: xhci_handle_port_status: port-1: Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: CSC Wake:

After this urb b2383f4 is canceled and given back:

  13763.474221: xhci_urb_dequeue: ep4in-bulk: urb 000000000b2383f4 pipe 3221360512 slot 14 length 0/4096 sgs 1/1 stream 0 flags 00040200
  13763.474225: xhci_dbg_cancel_urb: Cancel URB 000000000b2383f4, dev 2, ep 0x84, starting at offset 0xfeaec000
   ...
   13763.474673: xhci_urb_giveback: ep4in-bulk: urb 000000000b2383f4 pipe 3221360512 slot 14 length 0/4096 sgs 1/1 stream 0 flags 00040200