Skip to content

fix AC97 read timeouts

Marc-Oliver Westerburg requested to merge fix_ac97_readtimeouts into linux-5.15.32-seco

Previously we see AC97 read register calls timing out every once in a while. Adding some debug outputs, these mostly seem to be cases, where the SAI driver doesn't find the expected answer in the received frames.

Three potential causes have been identified:

  • frame "border" occuring exactly between enabling RMR and TMR, resulting in receiving an additional empty RX frame (4 instead of 3) until the answer arrives
  • kernel preemption between RMR and TMR resulting in potentially lots of empty frames accumulating in the RX-FIFO
  • runnig in a timeout, because the code gave up after 63us already (3 frames), although due to the asynchronous timing we might have to wait up to almost 104us (5 frames)

This patch adds fixes for all three cases. During first manual tests no more timeouts could be produced.

BCS: 746-001295

Merge request reports

Loading