Patch "mtd: rawnand: Prevent sequential reads with on-die ECC engines" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mtd: rawnand: Prevent sequential reads with on-die ECC engines

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mtd-rawnand-prevent-sequential-reads-with-on-die-ecc-engines.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From a62c4597953fe54c6af04166a5e2872efd0e1490 Mon Sep 17 00:00:00 2001
From: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
Date: Fri, 15 Dec 2023 13:32:07 +0100
Subject: mtd: rawnand: Prevent sequential reads with on-die ECC engines
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>

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@xxxxxxxxxxxxxxx
Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads")
Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
Tested-by: Martin Hundebøll <martin@xxxxxxxxxx>
Link: https://lore.kernel.org/linux-mtd/20231215123208.516590-4-miquel.raynal@xxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/mtd/nand/raw/nand_base.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -5170,6 +5170,14 @@ static void rawnand_late_check_supported
 	/* 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;
 


Patches currently in stable-queue which might be from miquel.raynal@xxxxxxxxxxx are

queue-6.7/mtd-rawnand-prevent-crossing-lun-boundaries-during-sequential-reads.patch
queue-6.7/mtd-rawnand-fix-core-interference-with-sequential-reads.patch
queue-6.7/mtd-rawnand-clarify-conditions-to-enable-continuous-reads.patch
queue-6.7/dmaengine-xilinx-xdma-fix-the-count-of-elapsed-perio.patch
queue-6.7/mtd-rawnand-prevent-sequential-reads-with-on-die-ecc-engines.patch
queue-6.7/mtd-maps-vmu-flash-fix-the-mtd-core-switch-to-ref-counters.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux