spi/bcm63xx: don't substract prepend length from total length
authorJonas Gorski <jogo@openwrt.org>
Tue, 17 Dec 2013 20:42:07 +0000 (21:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Feb 2014 21:48:01 +0000 (13:48 -0800)
commit 86b3bde003e6bf60ccb9c09b4115b8a2f533974c upstream.

The spi command must include the full message length including any
prepended writes, else transfers larger than 256 bytes will be
incomplete.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-bcm63xx.c

index a4ec5f4..cd716f4 100644 (file)
@@ -180,8 +180,6 @@ static int bcm63xx_txrx_bufs(struct spi_device *spi, struct spi_transfer *first,
                               transfer_list);
        }
 
-       len -= prepend_len;
-
        init_completion(&bs->done);
 
        /* Fill in the Message control register */