mtd: rawnand: Prevent sequential reads with on-die ECC engines
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 15 Dec 2023 12:32:07 +0000 (13:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:18:50 +0000 (16:18 -0800)
commitc376f862eccafed929d0983ebf5ffb90cd468ba7
treec2d75508bc9bbb100b9c23947569c4682964df8f
parentb1dca19b105c44ebddc3dc31155795083ca0b808
mtd: rawnand: Prevent sequential reads with on-die ECC engines

commit a62c4597953fe54c6af04166a5e2872efd0e1490 upstream.

Some devices support sequential reads when using the on-die ECC engines,
some others do not. It is a bit hard to know which ones will break other
than experimentally, so in order to avoid such a difficult and painful
task, let's just pretend all devices should avoid using this
optimization when configured like this.

Cc: stable@vger.kernel.org
Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tested-by: Martin Hundebøll <martin@geanix.com>
Link: https://lore.kernel.org/linux-mtd/20231215123208.516590-4-miquel.raynal@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/raw/nand_base.c