mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 21:15:53 +02:00
mtd: rawnand: Prevent sequential reads with on-die ECC engines
commita62c459795upstream. 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:003fe4b954("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>
This commit is contained in:
parent
b1dca19b10
commit
c376f862ec
|
|
@ -5171,6 +5171,14 @@ static void rawnand_late_check_supported_ops(struct nand_chip *chip)
|
|||
/* The supported_op fields should not be set by individual drivers */
|
||||
WARN_ON_ONCE(chip->controller->supported_op.cont_read);
|
||||
|
||||
/*
|
||||
* Too many devices do not support sequential cached reads with on-die
|
||||
* ECC correction enabled, so in this case refuse to perform the
|
||||
* automation.
|
||||
*/
|
||||
if (chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_ON_DIE)
|
||||
return;
|
||||
|
||||
if (!nand_has_exec_op(chip))
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user