aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-bcm63xx.c
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-12-17 15:42:08 -0500
committerMark Brown <broonie@linaro.org>2013-12-17 17:40:19 -0500
commit20e9e78f8b0f1ed02a3a095240853b1767482757 (patch)
tree9be50c55ccdca56d055a509046f6314ee90eed4a /drivers/spi/spi-bcm63xx.c
parentacf4fc6ffa84b59e83f34f587be623a05bc0c55c (diff)
spi/bcm63xx: don't reject reads >= 256 bytes
The rx_tail register is only 8 bit wide, so it will wrap around after 256 read bytes. This makes it rather meaningless, so drop any usage of it to not treat reads over 256 as failed. Signed-off-by: Jonas Gorski <jogo@openwrt.org> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-bcm63xx.c')
-rw-r--r--drivers/spi/spi-bcm63xx.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 7b4ead78782c..e20a669c190c 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -205,13 +205,7 @@ static int bcm63xx_txrx_bufs(struct spi_device *spi, struct spi_transfer *first,
205 if (!timeout) 205 if (!timeout)
206 return -ETIMEDOUT; 206 return -ETIMEDOUT;
207 207
208 /* read out all data */ 208 if (!do_rx)
209 rx_tail = bcm_spi_readb(bs, SPI_RX_TAIL);
210
211 if (do_rx && rx_tail != len)
212 return -EIO;
213
214 if (!rx_tail)
215 return 0; 209 return 0;
216 210
217 len = 0; 211 len = 0;