kernel: fix bluetooth and zsmalloc for 3.14
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.13 / 006-spi-bcm63xx-don-t-reject-reads-256-bytes.patch
1 From 4d8fa9d3d1fe1d70fe7d59537acf49797f6010a1 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Sun, 1 Dec 2013 16:19:46 +0100
4 Subject: [PATCH 2/2] spi/bcm63xx: don't reject reads >= 256 bytes
5
6 The rx_tail register is only 8 bit wide, so it will wrap around
7 after 256 read bytes. This makes it rather meaningless, so drop any
8 usage of it to not treat reads over 256 as failed.
9
10 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
11 ---
12 drivers/spi/spi-bcm63xx.c | 8 +-------
13 1 file changed, 1 insertion(+), 7 deletions(-)
14
15 --- a/drivers/spi/spi-bcm63xx.c
16 +++ b/drivers/spi/spi-bcm63xx.c
17 @@ -205,13 +205,7 @@ static int bcm63xx_txrx_bufs(struct spi_
18 if (!timeout)
19 return -ETIMEDOUT;
20
21 - /* read out all data */
22 - rx_tail = bcm_spi_readb(bs, SPI_RX_TAIL);
23 -
24 - if (do_rx && rx_tail != len)
25 - return -EIO;
26 -
27 - if (!rx_tail)
28 + if (!do_rx)
29 return 0;
30
31 len = 0;