Brcm nand controller prefetch feature needs to be disabled by default. Enabling affects performance on random reads as well as dma reads.
Signed-off-by: Kamal Dasu kdasu.kdev@gmail.com Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller") Cc: stable@vger.kernel.org --- drivers/mtd/nand/brcmnand/brcmnand.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c index dd56a67..2a978d9 100644 --- a/drivers/mtd/nand/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/brcmnand/brcmnand.c @@ -2193,16 +2193,9 @@ static int brcmnand_setup_dev(struct brcmnand_host *host) if (ctrl->nand_version >= 0x0702) tmp |= ACC_CONTROL_RD_ERASED; tmp &= ~ACC_CONTROL_FAST_PGM_RDIN; - if (ctrl->features & BRCMNAND_HAS_PREFETCH) { - /* - * FIXME: Flash DMA + prefetch may see spurious erased-page ECC - * errors - */ - if (has_flash_dma(ctrl)) - tmp &= ~ACC_CONTROL_PREFETCH; - else - tmp |= ACC_CONTROL_PREFETCH; - } + if (ctrl->features & BRCMNAND_HAS_PREFETCH) + tmp &= ~ACC_CONTROL_PREFETCH; + nand_writereg(ctrl, offs, tmp);
return 0;
On 01/08/2018 12:36 PM, Kamal Dasu wrote:
Brcm nand controller prefetch feature needs to be disabled by default. Enabling affects performance on random reads as well as dma reads.
Signed-off-by: Kamal Dasu kdasu.kdev@gmail.com Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller") Cc: stable@vger.kernel.org
Acked-by: Florian Fainelli f.fainelli@gmail.com
On 01/08/2018 12:36 PM, Kamal Dasu wrote:
Brcm nand controller prefetch feature needs to be disabled by default. Enabling affects performance on random reads as well as dma reads.
Signed-off-by: Kamal Dasu kdasu.kdev@gmail.com Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller") Cc: stable@vger.kernel.org
Boris, is there a reason this is not in your v4.16 pull request? If not, could you take that fix?
Thank you
On Sat, 20 Jan 2018 15:13:35 -0800 Florian Fainelli f.fainelli@gmail.com wrote:
On 01/08/2018 12:36 PM, Kamal Dasu wrote:
Brcm nand controller prefetch feature needs to be disabled by default. Enabling affects performance on random reads as well as dma reads.
Signed-off-by: Kamal Dasu kdasu.kdev@gmail.com Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller") Cc: stable@vger.kernel.org
Boris, is there a reason this is not in your v4.16 pull request?
Look carefully, it is there ;-).
" Kamal Dasu (1): mtd: nand: brcmnand: Disable prefetch by default "
If not, could you take that fix?
Thank you
On 01/20/2018 03:53 PM, Boris Brezillon wrote:
On Sat, 20 Jan 2018 15:13:35 -0800 Florian Fainelli f.fainelli@gmail.com wrote:
On 01/08/2018 12:36 PM, Kamal Dasu wrote:
Brcm nand controller prefetch feature needs to be disabled by default. Enabling affects performance on random reads as well as dma reads.
Signed-off-by: Kamal Dasu kdasu.kdev@gmail.com Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller") Cc: stable@vger.kernel.org
Boris, is there a reason this is not in your v4.16 pull request?
Look carefully, it is there ;-).
Indeed, I can't read, my bad.
linux-stable-mirror@lists.linaro.org