AnsweredAssumed Answered

XHCI: USB transaction errors causes instability

Question asked by Jonas Karlsson on Feb 24, 2020
Latest reply on Mar 22, 2020 by D.w. Luo

Hi,

 

I would like some advice on a USB issue that we are struggling with. We are using BSP 4.19.35.

 

The modem that is connected to the i.MX8qxp via a usb hub sometimes misbehaves and we see 'USB transaction errors' for all transfers in the xhci traces. At least we think it is the modem that is misbehaving. The modem is the only device connected to the hub.

 

The 'USB transaction error' causes a loop where the xhci driver seems to reset the endpoint, sets the TR dequeue pointer and then starts a new transfer which will also fail and then the loop repeats it self. This causes a lot of events to be generated on the event ring which causes “xhci-cdns3: ERROR unknown event type 37” spam and as a consequence almost all cpu time is spent executing xhci interrupts. This sometimes leads to RCU stalls and sometimes kernel panics. The RCU stalls have been discussed in https://community.nxp.com/thread/524191

 

When we end up in a loop where all transfers fail we have also discovered that the loop cannot be stopped by pulling the reset pin of the hub. We can see the TRB_PORT_STATUS event being handled in xhci_handle_event() function but the loop continues despite there being nothing connected to USB any longer.

 

The only thing we can do to get out of this situation is either to unbind the driver or reboot the board.

 

What can we do to prevent the i.MX8 from becoming unreliable when a USB device is misbehaving? 

 

Please find attached an extract of an xhci-cdns3 showing the symptoms.

 

 

BR,

Jonas

Attachments

Outcomes