diff options
author | Jonas Gorski <jogo@openwrt.org> | 2014-01-13 12:11:58 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2014-01-13 12:11:58 +0000 |
commit | af7e570c3b63d414533aaf179ef0cbc5b620ec6f (patch) | |
tree | eb2b95743987920923e5c673a875476ab1b79937 /target/linux/brcm63xx/patches-3.10/054-spi-bcm63xx-don-t-substract-prepend-length-from-tota.patch | |
parent | f08f0cafc24619242853e3fe11e2e5876c498551 (diff) | |
download | mtk-20170518-af7e570c3b63d414533aaf179ef0cbc5b620ec6f.zip mtk-20170518-af7e570c3b63d414533aaf179ef0cbc5b620ec6f.tar.gz mtk-20170518-af7e570c3b63d414533aaf179ef0cbc5b620ec6f.tar.bz2 |
brcm63xx: fix legacy spi tranfers >= 256 bytes
Fixes e.g. SPI flash access on BCM6358/BCM6368. Transfers < 256 bytes
are not affected.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39265
Diffstat (limited to 'target/linux/brcm63xx/patches-3.10/054-spi-bcm63xx-don-t-substract-prepend-length-from-tota.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-3.10/054-spi-bcm63xx-don-t-substract-prepend-length-from-tota.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.10/054-spi-bcm63xx-don-t-substract-prepend-length-from-tota.patch b/target/linux/brcm63xx/patches-3.10/054-spi-bcm63xx-don-t-substract-prepend-length-from-tota.patch new file mode 100644 index 0000000..4224745 --- /dev/null +++ b/target/linux/brcm63xx/patches-3.10/054-spi-bcm63xx-don-t-substract-prepend-length-from-tota.patch @@ -0,0 +1,26 @@ +From e85583b12b023773b488cf8406f11719a4037461 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski <jogo@openwrt.org> +Date: Sun, 1 Dec 2013 16:16:44 +0100 +Subject: [PATCH 1/2] spi/bcm63xx: don't substract prepend length from total + length + +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> +--- + drivers/spi/spi-bcm63xx.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/spi/spi-bcm63xx.c ++++ b/drivers/spi/spi-bcm63xx.c +@@ -180,8 +180,6 @@ static int bcm63xx_txrx_bufs(struct spi_ + transfer_list); + } + +- len -= prepend_len; +- + init_completion(&bs->done); + + /* Fill in the Message control register */ |