Skip to contentSkip to conversation

Patch "mtd: nand: atmel: Fix get_sectorsize() function" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Apr 1, 2018

Subsystems (4)
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: atmel: Fix get_sectorsize() function

to the 4.14-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-atmel-fix-get_sectorsize-function.patch
and it can be found in the queue-4.14 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 2b1b1b4ac716fd929a2d221bd4ade62263bed915 Mon Sep 17 00:00:00 2001

From: Boris Brezillon <[email protected]>
Date: Tue, 27 Mar 2018 19:01:58 +0200
Subject: mtd: nand: atmel: Fix get_sectorsize() function

From: Boris Brezillon <[email protected]>

commit 2b1b1b4ac716fd929a2d221bd4ade62263bed915 upstream.

get_sectorsize() was not using the appropriate macro to extract the ECC sector size from the config cache, which led to buggy ECC when using 1024 byte sectors.

---
 drivers/mtd/nand/atmel/pmecc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/atmel/pmecc.c +1 -1
@@ -426,7 +426,7 @@ static int get_strength(struct atmel_pme
 
 static int get_sectorsize(struct atmel_pmecc_user *user)
 {
-	return user->cache.cfg & PMECC_LOOKUP_TABLE_SIZE_1024 ? 1024 : 512;
+	return user->cache.cfg & PMECC_CFG_SECTOR1024 ? 1024 : 512;
 }
 
 static void atmel_pmecc_gen_syndrome(struct atmel_pmecc_user *user, int sector)

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

queue-4.14/mtd-jedec_probe-fix-crash-in-jedec_read_mfr.patch queue-4.14/mtd-nand-atmel-fix-get_sectorsize-function.patch