Re: USB transaction errors causing ERROR unknown event type 37

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27.2.2023 6.13, Fengyi WU wrote:
Hi,

We have a board NXP i.MX8MPlus EVK. We are running Linux 5.4.24 from NXP on the SoC.

There is an analog to USB converter connected to the SoC via USB.
The converter is this.
https://www.linuxtv.org/wiki/index.php/The_Imaging_Source_DFG-USB2pro#Making_it_Work

We want to play video on the EVK and the result is that with 640*480 resolution, the video quality is very bad
And the FPS is only 10.
Before we applied the patch from Peter Chen, the 640*480 resolution is not playable.
So the patch from Peter is usable, but not enough for us to make a good video quality.

The patch is this:
https://patchwork.kernel.org/project/linux-usb/patch/1573836603-10871-2-git-send-email-mathias.nyman@xxxxxxxxxxxxxxx/

And we saw a lot of ERROR unknown event type 37 log on the console while the video is playing when it is not well working
[  272.942827] xhci-hcd xhci-hcd.1.auto: ERROR unknown event type 37
[  272.999240] xhci-hcd xhci-hcd.1.auto: ERROR unknown event type 37
[  273.055696] xhci-hcd xhci-hcd.1.auto: ERROR unknown event type 37
[  273.112372] xhci-hcd xhci-hcd.1.auto: ERROR unknown event type 37
[  273.168736] xhci-hcd xhci-hcd.1.auto: ERROR unknown event type 37
[  273.225463] xhci-hcd xhci-hcd.1.auto: ERROR unknown event type 37
[  273.281947] xhci-hcd xhci-hcd.1.auto: ERROR unknown event type 37
[  273.338204] xhci-hcd xhci-hcd.1.auto: ERROR unknown event type 37
[  273.394560] xhci-hcd xhci-hcd.1.auto: ERROR unknown event type 37
[  273.451048] xhci-hcd xhci-hcd.1.auto: ERROR unknown event type 37
[  273.506856] xhci-hcd xhci-hcd.1.auto: ERROR unknown event type 37
[  273.563624] xhci-hcd xhci-hcd.1.auto: ERROR unknown event type 37

We do tried the same USB converter device on Ubuntu kernel and everything is working fine, and the USB converter kernel driver between NXP kernel and ubuntu kernel is the same.
So the problem we think is from the USB 3.0 xhci core driver.

Event type 37 is a "host controller event", usually seen when event ring is full.

The patch from Peter Chen also touches this area, making sure we update the event ring
dequeue pointer in hardware more often.

This error can happen if interrupts are disabled for a long time, or we have a lot of
TRBs on the event ring that don't generate interrupts.

There are some changes in this area since 5.4 kernel.
Is it possible to try a more recent kernel?

For example in kernel 5.5 we are giving back URBs in tasklet context, see:
36dc01657b49 usb: host: xhci: Support running urb giveback in tasklet context

Other things to try:
- set xhci->quirks |= XHCI_AVOID_BEI to make isoc transfers interrupt more often
- adjust the xhci interrupt moderation interval (IMODI)
- Add xhci dynamic debug and tracing to get more details of what is really going on


Thanks
Mathias




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux