android_kernel_samsung_a7y1.../drivers/spi
Sowjanya Komatineni b23113f91c spi: tegra114: fix for unpacked mode transfers
[ Upstream commit 1a89ac5b91895127f7c586ec5075c3753ca25501 ]

Fixes: computation of actual bytes to fill/receive in/from FIFO in unpacked
mode when transfer length is not a multiple of requested bits per word.

unpacked mode transfers fails when the transfer includes partial bytes in
the last word.

Total words to be written/read to/from FIFO is computed based on transfer
length and bits per word. Unpacked mode includes 0 padding bytes for partial
words to align with bits per word and these extra bytes are also accounted
for calculating bytes left to transfer in the current driver.

This causes extra bytes access of tx/rx buffers along with buffer index
position crossing actual length where remain_len becomes negative and due to
unsigned type, negative value is a 32 bit representation of signed value
and transferred bytes never meets the actual transfer length resulting in
transfer timeout and a hang.

This patch fixes this with proper computation of the actual bytes to fill in
FIFO during transmit and the actual bytes to read from FIFO during receive
ignoring 0 padded bytes.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 13:41:14 +02:00
..
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-adi-v3.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-altera.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-ath79.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-atmel.c spi: atmel: fix handling of cs_change set on non-last xfer 2020-04-07 13:37:14 +02:00
spi-au1550.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-bcm53xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-bcm53xx.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-bcm63xx-hsspi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-bcm63xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-bcm2835.c spi: bcm2835: Fix 3-wire mode if DMA is enabled 2020-04-06 20:28:49 +02:00
spi-bcm2835aux.c spi: bcm2835aux: fix corruptions for longer spi transfers 2020-04-06 21:34:39 +02:00
spi-bfin-sport.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-bfin5xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-bitbang-txrx.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-bitbang.c spi: bitbang: Fix NULL pointer dereference in spi_unregister_master 2020-04-06 19:17:43 +02:00
spi-butterfly.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-cadence.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-clps711x.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-coldfire-qspi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-davinci.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-dln2.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-dw-mid.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-dw-mmio.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-dw-pci.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-dw.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-dw.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-efm32.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-ep93xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-falcon.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-fsl-cpm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-fsl-cpm.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-fsl-dspi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-fsl-espi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-fsl-lib.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-fsl-lib.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-fsl-spi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-fsl-spi.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-gpio.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-img-spfi.c spi: img-spfi: fix potential double release 2020-04-07 13:20:59 +02:00
spi-imx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-lm70llp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-meson-spifc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-mpc52xx-psc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-mpc52xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-mpc512x-psc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-mt65xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-mxs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-nuc900.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-oc-tiny.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-octeon.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-omap-100k.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-omap-uwire.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-omap2-mcspi.c spi: omap2-mcspi: Fix DMA and FIFO event trigger size mismatch 2020-04-07 12:36:46 +02:00
spi-orion.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-pl022.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-ppc4xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-pxa2xx-dma.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-pxa2xx-pci.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-pxa2xx.c spi: pxa2xx: Add missed security checks 2020-04-07 13:21:30 +02:00
spi-pxa2xx.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-qup.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-rb4xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-rockchip.c spi: rockchip: initialize dma_slave_config properly 2020-04-07 12:33:28 +02:00
spi-rspi.c spi: rspi: Fix sequencer reset during initialization 2020-04-06 18:20:31 +02:00
spi-s3c24xx-fiq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-s3c24xx-fiq.S A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-s3c24xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-s3c64xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-sc18is602.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-sh-hspi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-sh-msiof.c spi: sh-msiof: fix deferred probing 2020-04-07 12:34:27 +02:00
spi-sh-sci.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-sh.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-sirf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-st-ssc4.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-sun4i.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-sun6i.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-tegra20-sflash.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-tegra20-slink.c spi: tegra20-slink: add missed clk_unprepare 2020-04-07 13:21:39 +02:00
spi-tegra114.c spi: tegra114: fix for unpacked mode transfers 2020-04-07 13:41:14 +02:00
spi-ti-qspi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-tle62x0.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-topcliff-pch.c spi : spi-topcliff-pch: Fix to handle empty DMA buffers 2020-04-06 18:20:29 +02:00
spi-txx9.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-xcomm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-xilinx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-xlp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-xtensa-xtfpga.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi-zynqmp-gqspi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spi.c spi: Fix zero length xfer bug 2020-04-06 18:20:33 +02:00
spidev.c spi: Add call to spi_slave_abort() function when spidev driver is released 2020-04-07 13:20:05 +02:00