kernel_samsung_a53x/drivers/dma
Andy Shevchenko 3ef33d4e69 dmaengine: dw: Select only supported masters for ACPI devices
[ Upstream commit f0e870a0e9c5521f2952ea9f3ea9d3d122631a89 ]

The recently submitted fix-commit revealed a problem in the iDMA 32-bit
platform code. Even though the controller supported only a single master
the dw_dma_acpi_filter() method hard-coded two master interfaces with IDs
0 and 1. As a result the sanity check implemented in the commit
b336268dde75 ("dmaengine: dw: Add peripheral bus width verification")
got incorrect interface data width and thus prevented the client drivers
from configuring the DMA-channel with the EINVAL error returned. E.g.,
the next error was printed for the PXA2xx SPI controller driver trying
to configure the requested channels:

> [  164.525604] pxa2xx_spi_pci 0000:00:07.1: DMA slave config failed
> [  164.536105] pxa2xx_spi_pci 0000:00:07.1: failed to get DMA TX descriptor
> [  164.543213] spidev spi-SPT0001:00: SPI transfer failed: -16

The problem would have been spotted much earlier if the iDMA 32-bit
controller supported more than one master interfaces. But since it
supports just a single master and the iDMA 32-bit specific code just
ignores the master IDs in the CTLLO preparation method, the issue has
been gone unnoticed so far.

Fix the problem by specifying the default master ID for both memory
and peripheral devices in the driver data. Thus the issue noticed for
the iDMA 32-bit controllers will be eliminated and the ACPI-probed
DW DMA controllers will be configured with the correct master ID by
default.

Cc: stable@vger.kernel.org
Fixes: b336268dde75 ("dmaengine: dw: Add peripheral bus width verification")
Fixes: 199244d69458 ("dmaengine: dw: add support of iDMA 32-bit hardware")
Reported-by: Ferry Toth <fntoth@gmail.com>
Closes: https://lore.kernel.org/dmaengine/ZuXbCKUs1iOqFu51@black.fi.intel.com/
Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Closes: https://lore.kernel.org/dmaengine/ZuXgI-VcHpMgbZ91@black.fi.intel.com/
Tested-by: Ferry Toth <fntoth@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20241104095142.157925-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-15 16:29:54 +01:00
..
bestcomm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dw dmaengine: dw: Select only supported masters for ACPI devices 2025-01-15 16:29:54 +01:00
dw-axi-dmac Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dw-edma Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl-dpaa2-qdma dmaengine: fsl-dpaa2-qdma: Fix the size of dma pools 2024-11-18 12:13:23 +01:00
hsu Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
idxd Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ioat dmaengine: ioatdma: Fix missing kmem_cache_destroy() 2024-11-19 14:19:09 +01:00
ipu Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mediatek dmaengine: mediatek: Fix deadlock caused by synchronize_irq() 2024-11-08 11:25:53 +01:00
ppc4xx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sf-pdma Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh dmaengine: shdma: increase size of 'dev_id' 2024-11-18 22:25:32 +01:00
ti dmaengine: ti: edma: Add some null pointer checks to the edma_probe 2024-11-18 22:25:33 +01:00
xilinx dma: xilinx_dpdma: Fix locking 2024-11-19 11:32:40 +01:00
acpi-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
altera-msgdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amba-pl08x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
at_hdmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
at_hdmac_regs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
at_xdmac.c dmaengine: at_xdmac: avoid null_prt_deref in at_xdmac_prep_dma_memset 2025-01-15 16:29:49 +01:00
bcm-sba-raid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm2835-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
coh901318.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
coh901318.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
coh901318_lli.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dma-axi-dmac.c dmaengine: axi-dmac: fix possible race in remove() 2024-11-19 14:19:04 +01:00
dma-jz4780.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dmaengine.c dmaengine: fix NULL pointer in channel unregistration function 2024-11-18 12:12:55 +01:00
dmaengine.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dmatest.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ep93xx_dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl-edma-common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl-edma-common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl-edma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl-qdma.c dmaengine: fsl-qdma: init irq after reg initialization 2024-11-18 23:18:29 +01:00
fsl_raid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl_raid.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsldma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsldma.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hisi_dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
idma64.c dmaengine: idma64: Add check for dma_set_max_seg_size 2024-11-19 12:27:00 +01:00
idma64.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
img-mdc-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx-sdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iop-adma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iop-adma.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
k3dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig dmaengine: tegra210-adma: Update dependency to ARCH_TEGRA 2024-11-19 08:44:51 +01:00
lpc18xx-dmamux.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcf-edma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
milbeaut-hdmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
milbeaut-xdmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmp_pdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmp_tdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
moxart-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpc512x_dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mv_xor.c dmaengine: mv_xor: fix child node refcount handling in early exit 2025-01-15 16:29:49 +01:00
mv_xor.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mv_xor_v2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxs-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nbpfaxi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
of-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
owl-dma.c dmaengine: owl: fix register access functions 2024-11-19 11:32:40 +01:00
pch_dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pl330.c dmaengine: Revert "dmaengine: pl330: issue_pending waits until WFP state" 2024-11-19 11:32:41 +01:00
plx_dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pxa_dma.c dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc() 2024-11-18 11:43:05 +01:00
s3c24xx-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sa11x0-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
samsung-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sirf-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sprd-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_fdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_fdma.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ste_dma40.c dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe 2024-11-18 10:58:46 +01:00
ste_dma40_ll.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ste_dma40_ll.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-dmamux.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-mdma.c dmaengine: stm32-mdma: correct desc prep when channel running 2024-11-18 11:43:25 +01:00
sun4i-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sun6i-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tegra20-apb-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tegra210-adma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timb_dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
TODO Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
txx9dmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
txx9dmac.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uniphier-mdmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uniphier-xdmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virt-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virt-dma.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xgene-dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zx_dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00