linux icon indicating copy to clipboard operation
linux copied to clipboard

usb: xhci-hcd: add a gratuitous doorbell read

Open P33M opened this issue 1 year ago • 0 comments

This may assist in debugging https://github.com/raspberrypi/linux/issues/6141

The symptom is that the Interrupt endpoint for the dongle sometimes has one outstanding TRB, but the lack of USB bus activity suggests that the xHC didn't correctly register the TRB as valid when the doorbell ring happened.

Adding this dummy read seems to fix it.

--

There are probably less-bad ways to ensure consistency of memory before issuing a doorbell write, but this blunt instrument seems to work for me.

I can't tell if the root cause is the same as the gpio bitbash compression (RC swallowing writes), or some peculiarity of the xHC TRB fetch engine making this type of transfer vulnerable to stalling.

P33M avatar Oct 22 '24 14:10 P33M