linux-stable/drivers/dma
Serge Semin b1b40b8fe7 dmaengine: Introduce max SG burst capability
Some devices may lack the support of the hardware accelerated SG list
entries automatic walking through and execution. In this case a burden of
the SG list traversal and DMA engine re-initialization lies on the
DMA engine driver (normally implemented by using a DMA transfer completion
IRQ to recharge the DMA device with a next SG list entry). But such
solution may not be suitable for some DMA consumers. In particular SPI
devices need both Tx and Rx DMA channels work synchronously in order
to avoid the Rx FIFO overflow. In case if Rx DMA channel is paused for
some time while the Tx DMA channel works implicitly pulling data into the
Rx FIFO, the later will be eventually overflown, which will cause the data
loss. So if SG list entries aren't automatically fetched by the DMA
engine, but are one-by-one manually selected for execution in the
ISRs/deferred work/etc., such problem will eventually happen due to the
non-deterministic latencies of the service execution.

In order to let the DMA consumer know about the DMA device capabilities
regarding the hardware accelerated SG list traversal we introduce the
max_sg_burst capability. It is supposed to be initialized by the DMA engine
driver with 0 if there is no limitation of the number of SG entries
atomically executed and with non-zero value if there is such constraints,
so the upper limit is determined by the number set to the property.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200723005848.31907-5-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-07-27 14:30:54 +05:30
..
bestcomm treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
dw dmaengine: dw: Replace 'objs' by 'y' 2020-06-16 21:54:47 +05:30
dw-axi-dmac dmaengine: virt-dma: Add missing locking 2019-12-26 10:04:18 +05:30
dw-edma dmaengine: dw-edma: support local dma device transfer semantics 2020-05-04 14:24:27 +05:30
fsl-dpaa2-qdma dmaengine: fsl-dpaa2-qdma: remove set but not used variable 'dpaa2_qdma' 2020-03-06 19:04:55 +05:30
hsu dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
idxd dmaengine: idxd: move idxd interrupt handling to mask instead of ignore 2020-07-13 14:48:02 +05:30
ioat dmaengine: ioat: Fix some parameter misspelling and provide description for phys_complete 2020-07-15 17:50:57 +05:30
ipu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mediatek dmaengine: mediatek: mtk-hsdma: Fix formatting in 'struct mtk_hsdma_pdesc' doc block 2020-07-15 17:50:46 +05:30
ppc4xx dmaengine: ppc4xx: Use scnprintf() for avoiding potential buffer overflow 2020-03-11 15:10:45 +05:30
qcom treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
sf-pdma dmaengine: sf-pdma: Simplify the error handling path in 'sf_pdma_probe()' 2020-05-13 17:07:50 +05:30
sh dmaengine: fix spelling mistake "exceds" -> "exceeds" 2020-03-23 11:39:49 +05:30
ti dmaengine: ti: k3-udma: Query throughput level information from hardware 2020-07-27 14:23:03 +05:30
xilinx dmaengine: zynqmp_dma: Move list_del inside zynqmp_dma_free_descriptor. 2020-05-15 11:21:11 +05:30
acpi-dma.c dmaengine: acpi: Drop double check for ACPI companion device 2020-06-24 11:28:41 +05:30
altera-msgdma.c dmaengine: altera-msgdma: Fix struct documentation blocks 2020-07-15 17:50:46 +05:30
amba-pl08x.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
at_hdmac.c dmaengine: at_hdmac: Repair parameter misspelling and demote non-kerneldoc headers 2020-07-15 17:50:46 +05:30
at_hdmac_regs.h dmaengine: at_hdmac: Replace zero-length array with flexible-array 2020-05-13 20:25:16 +05:30
at_xdmac.c dmaengine: at_xdmac: Replace zero-length array with flexible-array 2020-05-13 20:25:41 +05:30
bcm-sba-raid.c dmaengine: bcm-sba-raid: Replace zero-length array with flexible-array member 2020-02-13 20:15:35 +05:30
bcm2835-dma.c dmaengine: bcm2835: do not call vchan_vdesc_fini() with lock held 2019-12-26 10:04:18 +05:30
coh901318.c dmaengine: coh901318: Fix a double lock bug in dma_tc_handle() 2020-02-24 21:59:45 +05:30
coh901318.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
coh901318_lli.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
dma-axi-dmac.c dmaengine: axi-dmac: add a check for devm_regmap_init_mmio 2019-12-11 16:11:50 +05:30
dma-jz4780.c dmaengine updates for v5.6-rc1 2020-01-27 10:55:50 -08:00
dmaengine.c dmaengine: Introduce max SG burst capability 2020-07-27 14:30:54 +05:30
dmaengine.h dmaengine: Create debug directories for DMA devices 2020-03-11 14:56:14 +05:30
dmatest.c dmaengine: cookie bypass for out of order completion 2020-06-17 19:45:14 +05:30
ep93xx_dma.c dmaengine: ep93xx_dma: Provide some missing struct attribute documentation 2020-07-15 17:50:46 +05:30
fsl-edma-common.c dmaengine: fsl-edma: Add eDMA support for QorIQ LS1028A platform 2019-12-18 11:55:46 +05:30
fsl-edma-common.h dmaengine: fsl-edma: Add eDMA support for QorIQ LS1028A platform 2019-12-18 11:55:46 +05:30
fsl-edma.c dmaengine: fsl-edma: Add eDMA support for QorIQ LS1028A platform 2019-12-18 11:55:46 +05:30
fsl-qdma.c dmaengine: Extend NXP QDMA driver to check transmission errors 2020-07-17 11:50:03 +05:30
fsl_raid.c
fsl_raid.h
fsldma.c dmaengine: fsldma: Mark expected switch fall-through 2019-08-20 19:42:34 -05:00
fsldma.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 40 2019-05-24 17:27:12 +02:00
hisi_dma.c dmaengine: hisilicon: Use struct_size() in devm_kzalloc() 2020-06-24 11:26:23 +05:30
idma64.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
idma64.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
img-mdc-dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
imx-dma.c dmaengine: imx-dma: Mark expected switch fall-through 2019-07-31 20:49:04 +05:30
imx-sdma.c dmaengine: imx-sdma: Correct formatting issue and provide 2 new descriptions 2020-07-15 17:50:47 +05:30
iop-adma.c dmaengine: iop-adma: Function parameter documentation must adhere to correct formatting 2020-07-15 17:50:47 +05:30
iop-adma.h dma: iop-adma: allow building without platform headers 2019-08-14 15:36:22 +02:00
k3dma.c dmaengine: k3dma: Avoid null pointer traversal 2019-12-23 13:21:14 +05:30
Kconfig dmaengine: idxd: fix PCI_MSI build errors 2020-07-15 11:33:39 +05:30
lpc18xx-dmamux.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Makefile dmaengine: uniphier-xdmac: Add UniPhier external DMA controller driver 2020-03-02 14:54:34 +05:30
mcf-edma.c dmaengine: fsl-edma: add drvdata for fsl-edma 2019-07-03 13:28:22 +05:30
mic_x100_dma.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
mic_x100_dma.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 290 2019-06-05 17:36:38 +02:00
milbeaut-hdmac.c dmaengine: milbeaut-hdmac: remove redundant error log 2019-11-08 09:26:17 +05:30
milbeaut-xdmac.c dmaengine: milbeaut-xdmac: remove redundant error log 2019-11-08 09:26:17 +05:30
mmp_pdma.c dmaengine: mmp_pdma: Demote obvious misuse of kerneldoc to standard comment blocks 2020-07-15 17:50:46 +05:30
mmp_tdma.c dmaengine: mmp_tdma: share the IRQ line 2020-06-16 21:59:01 +05:30
moxart-dma.c dmaengine: moxart-dma: Drop pointless static qualifier in moxart_probe() 2020-05-13 17:33:17 +05:30
mpc512x_dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 7 2019-05-21 11:28:40 +02:00
mv_xor.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
mv_xor.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
mv_xor_v2.c dmaengine: mv_xor_v2: Supply some missing 'struct mv_xor_v2_device' attribute docs 2020-07-15 17:50:47 +05:30
mxs-dma.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
nbpfaxi.c dmaengine: nbpfaxi: Provide some missing attribute docs and split out slave info 2020-07-15 17:50:47 +05:30
of-dma.c dmaengine: of-dma: Fix misspellings/formatting issues in some function headers 2020-07-15 17:50:46 +05:30
owl-dma.c dmaengine: owl: Use correct lock in owl_dma_get_pchan() 2020-05-04 14:25:06 +05:30
pch_dma.c dmaengine: pch_dma.c: Avoid data race between probe and irq handler 2020-04-23 11:47:16 +05:30
pl330.c dmaengine: pl330: Demote obvious misuse of kerneldoc to standard comment block 2020-07-15 17:50:46 +05:30
plx_dma.c dmaengine: plx-dma: Implement descriptor submission 2020-01-15 19:40:51 +05:30
pxa_dma.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
s3c24xx-dma.c dmaengine: s3c24xx-dma: fix spelling mistake "to" -> "too" 2020-01-23 17:03:25 +05:30
sa11x0-dma.c dmaengine: sa11x0: Replace zero-length array with flexible-array member 2020-02-19 17:48:40 +05:30
sirf-dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 4 2019-05-21 11:28:40 +02:00
sprd-dma.c dmaengine: sprd: Set request pending flag when DMA controller is active 2020-03-23 11:38:24 +05:30
st_fdma.c dmaengine: Remove dev_err() usage after platform_get_irq() 2019-07-31 20:50:53 +05:30
st_fdma.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ste_dma40.c dmaengine: ste_dma40: Supply 2 missing struct attribute descriptions 2020-07-15 17:50:46 +05:30
ste_dma40_ll.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
ste_dma40_ll.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
stm32-dma.c dmaengine: stm32-dma: direct mode support through device tree 2020-04-27 21:40:12 +05:30
stm32-dmamux.c dmaengine: stm32-dmamux: driver defers probe for clock and reset 2020-02-24 22:22:44 +05:30
stm32-mdma.c dmaengine: stm32-mdma: use vchan_terminate_vdesc() in .terminate_all 2020-02-24 22:20:01 +05:30
sun4i-dma.c dmaengine: sun4i-dma: Demote obvious misuse of kerneldoc to standard comment blocks 2020-07-15 17:50:47 +05:30
sun6i-dma.c dmaengine: Remove dev_err() usage after platform_get_irq() 2019-07-31 20:50:53 +05:30
tegra20-apb-dma.c dmaengine: tegra-apb: Ensure that clock is enabled during of DMA synchronization 2020-04-27 21:35:35 +05:30
tegra210-adma.c dmaengine: tegra210-adma: Fix an error handling path in 'tegra_adma_probe()' 2020-05-19 22:26:01 +05:30
timb_dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
TODO
txx9dmac.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
txx9dmac.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
uniphier-mdmac.c dmaengine: uniphier-mdmac: replace zero-length array with flexible-array member 2020-02-13 20:15:57 +05:30
uniphier-xdmac.c dmaengine: uniphier-xdmac: Remove redandant error log for platform_get_irq 2020-03-26 12:22:56 +05:30
virt-dma.c dmaengine updates for v5.6-rc1 2020-01-27 10:55:50 -08:00
virt-dma.h dmaengine: virt-dma: Add missing locking around list operations 2019-12-26 10:04:18 +05:30
xgene-dma.c dmaengine: xgene-dma: Provide descriptions for 'dev' and 'clk' in device's ddata 2020-07-15 17:50:47 +05:30
zx_dma.c dmaengine: zx: remove: removed dmam_pool_destroy 2019-11-14 12:16:53 +05:30