mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
ASoC: soc-generic-dmaengine: Fix DMA channel request warning
The DMA channel request code currently warns about legacy DMA failures
when the channel name is not present in dma-names. This can report a
firmware lookup failure as a legacy DMA failure.
Furthermore, failures from the legacy DMA path are already reported by
find_candidate(), making these warnings redundant.
Only warn when the channel name is present in dma-names but the request
fails, avoiding misleading and duplicate error messages.
Fixes: 9167f26047 ("ASoC: soc-generic-dmaengine: Handle DMA channel request failures correctly")
Reported-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/all/aoyBuho270dTWYBL@jupiter.universe/
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260825081949.55537-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -397,24 +397,8 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
|
||||
if (PTR_ERR(chan) == -EPROBE_DEFER)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
bool has_fw_node = dev->of_node || is_acpi_device_node(dev->fwnode);
|
||||
bool name_exists_in_fw = false;
|
||||
|
||||
if (has_fw_node)
|
||||
name_exists_in_fw = device_property_match_string(dev,
|
||||
"dma-names",
|
||||
name) >= 0;
|
||||
|
||||
if (has_fw_node && name_exists_in_fw)
|
||||
dev_warn(dev, "DTS/ACPI DMA channel '%s' request failed (%ld)\n",
|
||||
name, PTR_ERR(chan));
|
||||
|
||||
if (has_fw_node && !name_exists_in_fw)
|
||||
dev_warn(dev, "DTS/ACPI name '%s' not found, legacy failed (%ld)\n",
|
||||
name, PTR_ERR(chan));
|
||||
|
||||
if (!has_fw_node)
|
||||
dev_warn(dev, "Legacy DMA channel '%s' request failed (%ld)\n",
|
||||
if (device_property_match_string(dev, "dma-names", name) >= 0)
|
||||
dev_warn(dev, "dma-names has '%s' but request failed (%ld)\n",
|
||||
name, PTR_ERR(chan));
|
||||
|
||||
pcm->chan[i] = NULL;
|
||||
|
||||
Reference in New Issue
Block a user