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>
This commit is contained in:
Jonas Gorski 2013-12-17 21:42:08 +01:00 коммит произвёл Mark Brown
Родитель acf4fc6ffa
Коммит 20e9e78f8b
1 изменённых файлов: 1 добавлений и 7 удалений

Просмотреть файл

@ -205,13 +205,7 @@ static int bcm63xx_txrx_bufs(struct spi_device *spi, struct spi_transfer *first,
if (!timeout) if (!timeout)
return -ETIMEDOUT; return -ETIMEDOUT;
/* read out all data */ if (!do_rx)
rx_tail = bcm_spi_readb(bs, SPI_RX_TAIL);
if (do_rx && rx_tail != len)
return -EIO;
if (!rx_tail)
return 0; return 0;
len = 0; len = 0;