Repository navigation
Revert #5976 and use the upstream version of CORB dma left enabled issue - #6011
Merged
ujfalusi merged 2 commits intoNov 2, 2026
Conversation
This reverts commit 4db5285. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
…fers hda_dsp_probe() starts the CORB/RIRB DMA engines through hda_dsp_ctrl_init_chip(), but neither hda_dsp_remove() nor the error path of hda_dsp_probe() stops them before hda_dsp_stream_free() frees the CORB/RIRB ring buffer and the position buffer. Unsolicited responses also stay enabled, so the controller can keep writing RIRB entries into the freed page. Until commit 9e6966f ("ASoC: SOF: Intel: hda: Keep non-alt mlinks powered at probe on ACE2+"), hda_init_caps() dropped the initial references to the non-alternate links, and dropping the last one stopped the command DMA, so a probe that failed later, e.g. because the firmware is missing, did not leave it running. Now it does, and as the probe runs from a work item, the device stays bound after the failure, with bus mastering enabled and the DMA engines pointed at freed memory. Normal removal resumes the device first, which restarts the command DMA, so there the ring buffer is freed while the DMA is running until pci_disable_device() clears bus mastering. Stop the controller with hda_dsp_ctrl_stop_chip() before freeing the buffers, as is done on suspend, and export it for use from hda.c. This was reproduced by binding SOF in DSPless mode to a QEMU ich9-intel-hda: after the probe fails with "SOF firmware and/or topology file not found", CORB and RIRB DMA are still running with unsolicited responses and bus mastering enabled, and the page they use is soon reused as a page table. Fixes: 9e6966f ("ASoC: SOF: Intel: hda: Keep non-alt mlinks powered at probe on ACE2+") Signed-off-by: Sasha Levin <sashal@kernel.org> Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Tested-by: Li Yifan <yifan2.li@intel.com> Reported-by: Li Yifan <yifan2.li@intel.com> Closes: thesofproject#5976 Link: https://patch.msgid.link/20261028144446.992948-1-sashal@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the change to stop controller DMA before cleanup frees its buffers.
No open issues 🎉
What changed in this PR
Replaces the earlier CORB DMA shutdown fix with the upstream approach, stopping controller DMA before buffers are freed during SOF Intel HDA cleanup.
Changes:
- Calls
hda_dsp_ctrl_stop_chip()during probe error cleanup and device removal. - Exports the helper in the
SND_SOC_SOF_INTEL_HDA_COMMONnamespace.
| File | Description |
|---|---|
sound/soc/sof/intel/hda.c |
Stops CORB/RIRB and position-buffer DMA during cleanup. |
sound/soc/sof/intel/hda-ctrl.c |
Exports the controller-stop helper for cross-module use. |
Review effort: Balanced
bardliao
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
revert the applied patch in sof-dev and pick https://lore.kernel.org/linux-sound/20261028144446.992948-1-sashal@kernel.org/ from maintainer's tree.