linux/drivers/dma
Andy Shevchenko 3fe6409c23 dmaengine: dw: fix master selection
The commit 8950052029 ("dmaengine: dw: apply both HS interfaces and remove
slave_id usage") cleaned up the code to avoid usage of depricated slave_id
member of generic slave configuration.

Meanwhile it broke the master selection by removing important call to
dwc_set_masters() in ->device_alloc_chan_resources() which copied masters from
custom slave configuration to the internal channel structure.

Everything works until now since there is no customized connection of
DesignWare DMA IP to the bus, i.e. one bus and one or more masters are in use.
The configurations where 2 masters are connected to the different masters are
not working anymore. We are expecting one user of such configuration and need
to select masters properly. Besides that it is obviously a performance
regression since only one master is in use in multi-master configuration.

Select masters in accordance with what user asked for. Keep this patch in a form
more suitable for back porting.

We are safe to take necessary data in ->device_alloc_chan_resources() because
we don't support generic slave configuration embedded into custom one, and thus
the only way to provide such is to use the parameter to a filter function which
is called exactly before channel resource allocation.

While here, replase BUG_ON to less noisy dev_warn() and prevent channel
allocation in case of error.

Fixes: 8950052029 ("dmaengine: dw: apply both HS interfaces and remove slave_id usage")
Cc: stable@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2016-04-13 21:34:31 +05:30
..
bestcomm
dw dmaengine: dw: fix master selection 2016-04-13 21:34:31 +05:30
hsu dmaengine: hsu: speed up residue calculation 2015-12-05 14:00:34 +05:30
ioat dmaengine updates for 4.6 2016-03-17 12:34:54 -07:00
ipu
ppc4xx
qcom dmaengine updates for 4.6 2016-03-17 12:34:54 -07:00
sh dmaengine: rcar-dmac: clear pertinence number of channels 2016-03-03 21:51:14 +05:30
xilinx dmaengine: xilinx_vdma: Remove unnecessary variable initializations 2016-03-04 20:33:13 +05:30
Kconfig Merge branch 'topic/qcom' into for-linus 2016-03-14 11:18:22 +05:30
Makefile dmaengine: qcom_bam_dma: move to qcom directory 2016-03-11 07:42:06 +05:30
TODO
acpi-dma.c dmaengine: acpi-dma: align debug message with flow 2016-02-22 09:06:09 +05:30
amba-pl08x.c
at_hdmac.c dmaengine: at_hdmac: use %pad format string for dma_addr_t 2015-11-16 09:21:05 +05:30
at_hdmac_regs.h dmaengine: at_hdmac: use %pad format string for dma_addr_t 2015-11-16 09:21:05 +05:30
at_xdmac.c dmaengine: at_xdmac: fix residue computation 2016-03-10 16:32:36 +05:30
bcm2835-dma.c dmaengine: bcm2835-dma: Convert to use DMA pool 2015-12-05 15:36:32 +05:30
coh901318.c
coh901318.h
coh901318_lli.c
cppi41.c
dma-axi-dmac.c dmaengine: axi_dmac: Add synchronization support 2015-11-16 08:28:52 +05:30
dma-jz4740.c
dma-jz4780.c
dmaengine.c dmaengine: core: expose max burst capability to clients 2016-02-09 09:01:41 +05:30
dmaengine.h
dmatest.c
edma.c dmaengine updates for 4.6 2016-03-17 12:34:54 -07:00
ep93xx_dma.c dmaengine: ep93xx: Treat STALL and NFB IRQs same way 2016-01-25 09:49:55 +05:30
fsl-edma.c dmaengine: fsl-edma: add PM suspend/resume support 2015-12-05 15:52:13 +05:30
fsl_raid.c
fsl_raid.h
fsldma.c dmaengine: fsldma: fix memory leak 2016-03-09 12:15:22 +05:30
fsldma.h
idma64.c dmaengine: idma64: clear LLP_[SD]_EN bits in last descriptor 2016-02-15 22:06:45 +05:30
idma64.h asm-generic changes for 4.6 2016-03-24 23:13:48 -07:00
img-mdc-dma.c dmaengine: mdc: Correct terminate_all handling 2015-12-18 11:12:29 +05:30
imx-dma.c
imx-sdma.c dmaengine: imx-sdma: remove __init annotation on sdma_event_remap 2015-11-16 09:14:25 +05:30
iop-adma.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
k3dma.c
lpc18xx-dmamux.c
mic_x100_dma.c dma/mic_x100_dma: IS_ERR() vs PTR_ERR() typo 2016-03-03 21:13:01 +05:30
mic_x100_dma.h
mmp_pdma.c
mmp_tdma.c
moxart-dma.c
mpc512x_dma.c
mv_xor.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
mv_xor.h dmaengine: mv_xor: add suspend/resume support 2016-01-06 15:42:27 +05:30
mxs-dma.c
nbpfaxi.c
of-dma.c
omap-dma.c dmaengine: omap-dma: Implement device_synchronize callback 2016-02-22 08:19:02 +05:30
pch_dma.c
pl330.c dmaengine: pl330: fix to support the burst mode 2016-03-01 09:11:25 +05:30
pxa_dma.c ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
s3c24xx-dma.c
sa11x0-dma.c
sirf-dma.c dmaengine: sirf: use __maybe_unused to hide pm functions 2016-03-04 20:31:35 +05:30
ste_dma40.c ste_dma40: Delete an unnecessary variable initialisation in d40_probe() 2015-12-10 09:17:10 +05:30
ste_dma40_ll.c
ste_dma40_ll.h
stm32-dma.c dmaengine: stm32-dma: Fix unchecked deference of chan->desc 2015-12-10 09:45:22 +05:30
sun4i-dma.c dmaengine: sun4i: support module autoloading 2016-03-03 21:16:35 +05:30
sun6i-dma.c
tegra20-apb-dma.c dmaengine: tegra: Move of_device_id table near to its user 2016-03-04 20:36:01 +05:30
ti-dma-crossbar.c dmaengine: ti-dma-crossbar: dra7: Support for reserving DMA event ranges 2015-11-30 15:09:16 +05:30
timb_dma.c
txx9dmac.c
txx9dmac.h
virt-dma.c dmaengine: virt-dma: don't always free descriptor upon completion 2015-11-16 08:32:16 +05:30
virt-dma.h Merge branch 'topic/async' into for-linus 2016-01-06 15:17:47 +05:30
xgene-dma.c dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag 2016-01-07 11:09:36 +05:30
zx296702_dma.c dmaengine updates for 4.4-rc1 2015-11-10 10:05:17 -08:00