ASoC: SOF: ipc4-mtrace: process pending logs upon FW crash
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Tue, 7 Mar 2023 11:08:46 +0000 (13:08 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 7 Mar 2023 13:58:20 +0000 (13:58 +0000)
commitdb97cc0f7459a2bee68e6e8bf0b2f7a286137fa8
tree175070a1a849874636f247c80d056a51e23a085c
parent3c50211f2d534a5b766b1ff3c6cf6f7bd0bae753
ASoC: SOF: ipc4-mtrace: process pending logs upon FW crash

If the DSP firmware has crashed, some log messages may be pending in the
mtrace buffer, but not consumed by the driver as no IPC notification has
been sent by the firmware. Check the buffer status for all mtrace slots
and ensure any pending log messages are processed before DSP is possibly
powered down and the log buffer contents is lost.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230307110846.2265-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc4-mtrace.c