• Leonid Iziumtsev's avatar
    dmaengine: imx-dma: fix wrong callback invoke · dfaa3232
    Leonid Iziumtsev authored
    commit 341198ed upstream.
    
    Once the "ld_queue" list is not empty, next descriptor will migrate
    into "ld_active" list. The "desc" variable will be overwritten
    during that transition. And later the dmaengine_desc_get_callback_invoke()
    will use it as an argument. As result we invoke wrong callback.
    
    That behaviour was in place since:
    commit fcaaba6c ("dmaengine: imx-dma: fix callback path in tasklet").
    But after commit 4cd13c21 ("softirq: Let ksoftirqd do its job")
    things got worse, since possible delay between tasklet_schedule()
    from DMA irq handler and actual tasklet function execution got bigger.
    And that gave more time for new DMA request to be submitted and
    to be put into "ld_queue" list.
    
    It has been noticed that DMA issue is causing problems for "mxc-mmc"
    driver. While stressing the system with heavy network traffic and
    writing/reading to/from sd card simultaneously the timeout may happen:
    
    10013000.sdhci: mxcmci_watchdog: read time out (status = 0x30004900)
    
    That often lead to file system corruption.
    Signed-off-by: 's avatarLeonid Iziumtsev <leonid.iziumtsev@gmail.com>
    Signed-off-by: Vinod Koul's avatarVinod Koul <vkoul@kernel.org>
    Cc: stable@vger.kernel.org
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    dfaa3232
Name
Last commit
Last update
..
bestcomm Loading commit data...
dw Loading commit data...
dw-axi-dmac Loading commit data...
hsu Loading commit data...
ioat Loading commit data...
ipu Loading commit data...
mediatek Loading commit data...
ppc4xx Loading commit data...
qcom Loading commit data...
sh Loading commit data...
ti Loading commit data...
xilinx Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
TODO Loading commit data...
acpi-dma.c Loading commit data...
altera-msgdma.c Loading commit data...
amba-pl08x.c Loading commit data...
at_hdmac.c Loading commit data...
at_hdmac_regs.h Loading commit data...
at_xdmac.c Loading commit data...
bcm-sba-raid.c Loading commit data...
bcm2835-dma.c Loading commit data...
coh901318.c Loading commit data...
coh901318.h Loading commit data...
coh901318_lli.c Loading commit data...
dma-axi-dmac.c Loading commit data...
dma-jz4740.c Loading commit data...
dma-jz4780.c Loading commit data...
dmaengine.c Loading commit data...
dmaengine.h Loading commit data...
dmatest.c Loading commit data...
ep93xx_dma.c Loading commit data...
fsl-edma-common.c Loading commit data...
fsl-edma-common.h Loading commit data...
fsl-edma.c Loading commit data...
fsl_raid.c Loading commit data...
fsl_raid.h Loading commit data...
fsldma.c Loading commit data...
fsldma.h Loading commit data...
idma64.c Loading commit data...
idma64.h Loading commit data...
img-mdc-dma.c Loading commit data...
imx-dma.c Loading commit data...
imx-sdma.c Loading commit data...
iop-adma.c Loading commit data...
k3dma.c Loading commit data...
lpc18xx-dmamux.c Loading commit data...
mcf-edma.c Loading commit data...
mic_x100_dma.c Loading commit data...
mic_x100_dma.h Loading commit data...
mmp_pdma.c Loading commit data...
mmp_tdma.c Loading commit data...
moxart-dma.c Loading commit data...
mpc512x_dma.c Loading commit data...
mv_xor.c Loading commit data...
mv_xor.h Loading commit data...
mv_xor_v2.c Loading commit data...
mxs-dma.c Loading commit data...
nbpfaxi.c Loading commit data...
of-dma.c Loading commit data...
owl-dma.c Loading commit data...
pch_dma.c Loading commit data...
pl330.c Loading commit data...
pxa_dma.c Loading commit data...
s3c24xx-dma.c Loading commit data...
sa11x0-dma.c Loading commit data...
sirf-dma.c Loading commit data...
sprd-dma.c Loading commit data...
st_fdma.c Loading commit data...
st_fdma.h Loading commit data...
ste_dma40.c Loading commit data...
ste_dma40_ll.c Loading commit data...
ste_dma40_ll.h Loading commit data...
stm32-dma.c Loading commit data...
stm32-dmamux.c Loading commit data...
stm32-mdma.c Loading commit data...
sun4i-dma.c Loading commit data...
sun6i-dma.c Loading commit data...
tegra20-apb-dma.c Loading commit data...
tegra210-adma.c Loading commit data...
timb_dma.c Loading commit data...
txx9dmac.c Loading commit data...
txx9dmac.h Loading commit data...
virt-dma.c Loading commit data...
virt-dma.h Loading commit data...
xgene-dma.c Loading commit data...
zx_dma.c Loading commit data...