linux icon indicating copy to clipboard operation
linux copied to clipboard

[BUG] ipc tx timed out for 0x40010000 when unloading module

Open rfvirgil opened this issue 2 years ago • 3 comments

Hardware setup: UpXtreme TGL-0000 with BIOS R1.6 in NON-SoundWire mode connected to CDB35L56-FOUR-HD. HAT I2C for control. HAT SSP2 for audio. Software: Kernel v6.1, with CS35L56 ASoC driver and TGL machine driver SOF firmware v2.2.2

We would test with a newer SOF firmware if we could get them to work, but we can't.

To Reproduce As part of our unit testing we check that our driver module can be unloaded and re-loaded without any problems. To unload our module we must unload the Intel machine drivers. But when we do this we sometimes get a "ipc tx timed out" fault and then audio no longer works even though all drivers reloaded and applications can apparently play audio. The sequence of module unloads is: rmmod snd_sof_pci_intel_tgl rmmod snd_soc_cs35l56_i2c rmmod snd_soc_cs35l56_spi rmmod snd_soc_cs35l56

they are then modprobed in the opposite order.

Is there perhaps another Intel driver that we should be unloading here but it fails to have a dependency link to the drivers it depends on?

Reproduction Rate Maybe ~50%

Expected behavior Modules should unload and reload successfully.

Impact If this only happens if the modules are unloaded it's only an annoyance - we will have to skip some unit testing but modules are not normally unloaded by end users.

Crash [ 136.878620] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x40010000 (msg/reply size: 76/12) [ 136.878718] sof-audio-pci-intel-tgl 0000:00:1f.3: ------------[ IPC dump start ]------------ [ 136.878766] sof-audio-pci-intel-tgl 0000:00:1f.3: hda irq intsts 0x80000000 intlctl 0x40000000 rirb 00 [ 136.878800] sof-audio-pci-intel-tgl 0000:00:1f.3: dsp irq ppsts 0x80000000 adspis 0x00000001 [ 136.878841] sof-audio-pci-intel-tgl 0000:00:1f.3: error: host status 0x80000000 dsp status 0x00000000 mask 0x00000003 [ 136.878880] sof-audio-pci-intel-tgl 0000:00:1f.3: ------------[ IPC dump end ]------------ [ 136.878911] sof-audio-pci-intel-tgl 0000:00:1f.3: ------------[ DSP dump start ]------------ [ 136.878941] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout [ 136.878965] sof-audio-pci-intel-tgl 0000:00:1f.3: fw_state: SOF_FW_BOOT_COMPLETE (6) [ 136.879001] sof-audio-pci-intel-tgl 0000:00:1f.3: 0xffffffff: unknown ROM status value [ 136.879190] sof-audio-pci-intel-tgl 0000:00:1f.3: invalid header size 0xffffffff. FW oops is bogus [ 136.879223] sof-audio-pci-intel-tgl 0000:00:1f.3: unexpected fault 0xffffffff trace 0xffffffff [ 136.879256] sof-audio-pci-intel-tgl 0000:00:1f.3: ------------[ DSP dump end ]------------ [ 136.879288] sof-audio-pci-intel-tgl 0000:00:1f.3: ctx_save IPC error: -110, proceeding with suspend

rfvirgil avatar May 17 '23 10:05 rfvirgil

We think this is only on SSP2 configuration, not SoundWire. I can't say for certain that it never happens on SoundWire, but it'sour SSP2 setups that keep hitting this crash. The SoundWire systems are essentially the same (UpX TGL + SOF2.2.2 + CDB35L56-EIGHT-C) but we aren't seeing crashes.

rfvirgil avatar May 19 '23 14:05 rfvirgil

Looks like DSP is not in D0 ?

lgirdwood avatar Jul 04 '23 15:07 lgirdwood

@rfvirgil our tests for kmod load/unload rely on these scripts: https://github.com/thesofproject/sof-test/tree/main/tools/kmod

can you add your new modules in the scripts and see how it goes?

plbossart avatar Jul 05 '23 07:07 plbossart