linux-hardened/drivers/dma
Sebastian Andrzej Siewior 6f9d70568f dma: cppi41: wait longer for the HW to return the descriptor
For a "complete" teardown we have to wait until the teardown descriptor
is returned by the hardware. The g_zero testcase "testusb -a -t 9" triggers
the following warning quite reliable:

|------------[ cut here ]------------
|WARNING: CPU: 0 PID: 0 at drivers/dma/cppi41.c:609 cppi41_dma_control+0x198/0x304()
|[<c003f84c>] (warn_slowpath_null) from [<c02be8d8>]
|[<c02be8d8>] (cppi41_dma_control) from [<bf08d25c>]
|[<bf08d25c>] (cppi41_dma_channel_abort [musb_hdrc])
|[<bf08bc38>] (nuke.constprop.10 [musb_hdrc])
|[<bf08bd08>] (musb_gadget_disable [musb_hdrc])
|[<bf252524>] (disable_endpoints [usb_f_ss_lb])
|[<bf2525d8>] (disable_source_sink [usb_f_ss_lb])
|[<bf25260c>] (sourcesink_set_alt [usb_f_ss_lb])
|[<bf23ad24>] (composite_setup [libcomposite])
|[<bf08a2f4>] (musb_g_ep0_irq [musb_hdrc])
|[<bf085ec4>] (musb_interrupt [musb_hdrc])
|[<bf0aeaf4>] (dsps_interrupt [musb_dsps])
|[<c0080ea8>] (handle_irq_event_percpu)
|[<c008112c>] (handle_irq_event)
|[<c008348c>] (handle_level_irq)
|[<c00807a8>] (generic_handle_irq)
|[<c000ee80>] (handle_IRQ)
|[<c00085f0>] (omap3_intc_handle_irq)

and complains about a TD descriptor which is not returned. I've been
looking at several things and haven't noticed anything unusual that
might lead to this.
The manual says "to try again" until the descriptor comes out. I limited
the amount of retries to 100 retries in order to avoid an infinite number
of retries and so a busy-loop. Back then testing revealed that the
number of retries were around 20-30 so 100 seemed a good upper limit.
This g_zero test reaches without a problem 98 retries and it jumps
sometimes to 101 on am335x-evm and so the WARN_ON() triggers. Same test
run on beaglebone black and the retries start at 122 and my max value so
far was at 128.
So lets rise the limit to 500.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-12-09 14:45:41 +05:30
..
bestcomm drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
dw dmaengine: dw: export probe()/remove() and Co to users 2014-10-15 20:31:05 +05:30
ioat net_dma: simple removal 2014-09-28 07:05:16 -07:00
ipu dmaengine: ipu: use return value of request_irq 2014-07-25 15:39:50 +05:30
ppc4xx Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-01-29 20:27:23 -08:00
sh dmaengine: shdma: fix a race condition in __ld_cleanup() 2014-11-17 13:50:42 +05:30
xilinx dmaengine: xilinx: vdma: icg should be difference of stride and hsize 2014-11-06 13:11:47 +05:30
acpi-dma.c acpi-dma: convert to return error code when asked for channel 2014-02-11 23:30:50 +05:30
amba-pl08x.c dmaengine: pl08x: Remove chancnt affectations 2014-11-06 11:32:44 +05:30
at_hdmac.c dma: at_hdmac: fix invalid remaining bytes detection 2014-08-07 21:52:27 +05:30
at_hdmac_regs.h dmaengine: at_hdmac: remove unused function 2013-12-12 22:43:41 -08:00
at_xdmac.c dmaengine: at_xdmac: Add DMA_PRIVATE 2014-11-17 14:07:21 +05:30
bcm2835-dma.c dmaengine: Remove .owner field for driver 2014-11-06 11:54:18 +05:30
coh901318.c dmaengine: coh901318: use dmaengine_terminate_all() API 2014-10-15 21:30:59 +05:30
coh901318.h dma: coh901318: merge header files 2013-01-07 17:36:37 +01:00
coh901318_lli.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-02-26 09:24:48 -08:00
cppi41.c dma: cppi41: wait longer for the HW to return the descriptor 2014-12-09 14:45:41 +05:30
dma-jz4740.c dmaengine: Remove .owner field for driver 2014-11-06 11:54:18 +05:30
dmaengine.c dmaengine-3.17 2014-10-07 20:39:25 -04:00
dmaengine.h
dmatest.c dmaengine-3.17 2014-10-07 20:39:25 -04:00
edma.c dmaengine: edma: check for echan->edesc => NULL in edma_dma_pause() 2014-10-15 20:55:04 +05:30
ep93xx_dma.c dmaengine: Remove the context argument to the prep_dma_cyclic operation 2014-08-04 13:41:50 +05:30
fsl-edma.c dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model 2014-12-09 14:41:58 +05:30
fsldma.c dmaengine: fsldma: Remove chancnt affectations 2014-11-06 11:32:45 +05:30
fsldma.h dmaengine: Freescale: change descriptor release process for supporting async_tx 2014-07-14 21:32:18 +05:30
imx-dma.c dmaengine: Remove the context argument to the prep_dma_cyclic operation 2014-08-04 13:41:50 +05:30
imx-sdma.c dma: imx-sdma: clarify about firmware not found error 2014-12-05 23:18:53 +05:30
intel_mid_dma.c dmaengine: intel_mid_dma: use DMA_COMPLETE for dma completion status 2013-10-25 11:16:04 +05:30
intel_mid_dma_regs.h
iop-adma.c dmaengine: Remove .owner field for driver 2014-11-06 11:54:18 +05:30
k3dma.c dmaengine: k3dma: Add CONFIG_PM_SLEEP to suspend/resume functions 2014-11-17 13:50:45 +05:30
Kconfig Merge branch 'topic/at_xdmac' into for-linus 2014-12-05 19:31:32 +05:30
Makefile dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver 2014-11-06 11:00:08 +05:30
mic_x100_dma.c dma: MIC X100 DMA Driver 2014-07-12 09:57:42 -07:00
mic_x100_dma.h dma: MIC X100 DMA Driver 2014-07-12 09:57:42 -07:00
mmp_pdma.c dmaengine: Remove .owner field for driver 2014-11-06 11:54:18 +05:30
mmp_tdma.c dmaengine: Remove .owner field for driver 2014-11-06 11:54:18 +05:30
moxart-dma.c dmaengine: Add MOXA ART DMA engine driver 2014-01-20 12:32:46 +05:30
mpc512x_dma.c dmaengine: Remove .owner field for driver 2014-11-06 11:54:18 +05:30
mv_xor.c Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
mv_xor.h dma: mv_xor: Add support for DMA_INTERRUPT 2014-09-23 20:17:01 +05:30
mxs-dma.c dmaengine: Remove the context argument to the prep_dma_cyclic operation 2014-08-04 13:41:50 +05:30
nbpfaxi.c dmaengine: Remove .owner field for driver 2014-11-06 11:54:18 +05:30
of-dma.c dmaengine: of: add common xlate function for matching by channel id 2014-07-26 00:21:41 +05:30
omap-dma.c dmaengine: omap: Remove chancnt affectations 2014-11-06 11:32:45 +05:30
pch_dma.c drivers/dma/pch_dma: declare pch_dma_id_table as static 2014-12-05 23:28:30 +05:30
pl330.c dmaengine: pl330: update author info 2014-12-05 21:04:22 +05:30
qcom_bam_dma.c dmaengine: qcom_bam_dma: Add BAM v1.3.0 support 2014-11-17 13:50:40 +05:30
s3c24xx-dma.c dmaengine: Remove .owner field for driver 2014-11-06 11:54:18 +05:30
sa11x0-dma.c dmaengine: sa11x0: Remove chancnt affectations 2014-11-06 11:32:45 +05:30
sirf-dma.c dmaengine: sirf: Add CONFIG_PM_SLEEP to suspend/resume functions 2014-11-17 13:50:44 +05:30
ste_dma40.c dmaengine: ste_dma40: fix error return code 2014-12-05 23:25:48 +05:30
ste_dma40_ll.c dmaengine: ste_dma40_ll: Replace meaningless register set with comment 2013-06-04 11:12:10 +02:00
ste_dma40_ll.h dmaengine: ste_dma40: Remove unnecessary call to d40_phy_cfg() 2013-05-23 21:13:19 +02:00
sun6i-dma.c dmaengine: sun6i: Add support for Allwinner A23 (sun8i) variant 2014-11-17 13:50:37 +05:30
tegra20-apb-dma.c dmaengine: Remove .owner field for driver 2014-11-06 11:54:18 +05:30
timb_dma.c dmaengine: Remove .owner field for driver 2014-11-06 11:54:18 +05:30
TODO dmaengine: dw: don't perform DMA when dmaengine_submit is called 2014-07-15 22:14:30 +05:30
txx9dmac.c dma: fix build warnings in txx9 2013-12-12 22:43:41 -08:00
txx9dmac.h
virt-dma.c
virt-dma.h dma: fix vchan_cookie_complete() debug print 2014-01-26 17:33:45 +05:30