Skip to contentSkip to conversation

Patch "mtd: nand: Fix timing setup for NANDs that do not support SET FEATURES" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Aug 14, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

mtd: nand: Fix timing setup for NANDs that do not support SET FEATURES

to the 4.9-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-nand-fix-timing-setup-for-nands-that-do-not-support-set-features.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From a11bf5ed951f8900d244d09eb03a888b59c7fc82 Mon Sep 17 00:00:00 2001

From: Boris Brezillon <[email protected]>
Date: Mon, 31 Jul 2017 10:29:56 +0200
Subject: mtd: nand: Fix timing setup for NANDs that do not support SET FEATURES

From: Boris Brezillon <[email protected]>

commit a11bf5ed951f8900d244d09eb03a888b59c7fc82 upstream.

Some ONFI NANDs do not support the SET/GET FEATURES commands, which, according to the spec, is perfectly valid.

On these NANDs we can't set a specific timing mode using the "timing mode" feature, and we should assume the NAND does not require any setup to enter a specific timing mode.

Fixes d8e725dd8311 ("mtd: nand: automate NAND timings selection")
---
 drivers/mtd/nand/nand_base.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mtd/nand/nand_base.c +3 -1
@@ -1081,7 +1081,9 @@ static int nand_setup_data_interface(str
 	 * Ensure the timing mode has been changed on the chip side
 	 * before changing timings on the controller side.
 	 */
-	if (chip->onfi_version) {
+	if (chip->onfi_version &&
+	    (le16_to_cpu(chip->onfi_params.opt_cmd) &
+	     ONFI_OPT_CMD_SET_GET_FEATURES)) {
 		u8 tmode_param[ONFI_SUBFEATURE_PARAM_LEN] = {
 			chip->onfi_timing_mode_default,
 		};

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/mtd-nand-fix-timing-setup-for-nands-that-do-not-support-set-features.patch queue-4.9/nand-fix-wrong-default-oob-layout-for-small-pages-using-soft-ecc.patch