Skip to contentSkip to conversation

mtd: spinand: macronix: Fix MX35LFxGE4AD page size

PATCH In review Jaime Liao 3 participants 3 messages Jan 25, 2024 – Jan 27, 2024

Subsystems (3)
lore
Share & tools
lore

Jaime Liao

author
#0 lore raw

PATCH v3 1/1 mtd: spinand: macronix: Fix MX35LFxGE4AD page size

From: JaimeLiao <[email protected]>

Support for MX35LF{2,4}GE4AD chips was added in mainline through upstream commit 5ece78de88739b4c68263e9f2582380c1fd8314f.

The patch was later adapted to 5.4.y and backported through stable commit 85258ae3070848d9d0f6fbee385be2db80e8cf26.

Fix the backport mentioned right above as it is wrong: the bigger chip features 4kiB pages and not 2kiB pages.

Fixes 85258ae30708 ("mtd: spinand: macronix: Add support for MX35LFxGE4AD")
Cc [email protected] # v5.4.y
Cc Miquel Raynal <[email protected]>

---
Hello,

This is my third attempt to fix a stable kernel. This patch is not a backport from Linus' tree per-se, but a fix of a backport. The original mainline commit is fine but the backported one is not, we need to fix the backported commit in the 5.4.y stable kernel, and this is what I am attempting to do. Let me know if further explanations are needed.

Regards,
Jaime

---
 drivers/mtd/nand/spi/macronix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/spi/macronix.c +1 -1
index bbb1d68bce4a..f18c6cfe8ff5 100644
@@ -125,7 +125,7 @@ static const struct spinand_info macronix_spinand_table[] = {
 		     SPINAND_HAS_QE_BIT,
 		     SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, NULL)),
 	SPINAND_INFO("MX35LF4GE4AD", 0x37,
-		     NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1),
+		     NAND_MEMORG(1, 4096, 128, 64, 2048, 40, 1, 1, 1),
 		     NAND_ECCREQ(8, 512),
 		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
 					      &write_cache_variants,
Signature · 1 line
2.25.1
maintainer Acked-by on v3 1/1
#1 lore raw

Hi Jaime,

+ linux-mtd which was missing to your contribution.

[email protected] wrote on Thu, 25 Jan 2024 10:48:16 +0800:

Quoted 8 lines

From: JaimeLiao <[email protected]>

Support for MX35LF{2,4}GE4AD chips was added in mainline through upstream commit 5ece78de88739b4c68263e9f2582380c1fd8314f.

The patch was later adapted to 5.4.y and backported through stable commit 85258ae3070848d9d0f6fbee385be2db80e8cf26.

Quoted 7 lines

Fix the backport mentioned right above as it is wrong: the bigger chip features 4kiB pages and not 2kiB pages.

Fixes 85258ae30708 ("mtd: spinand: macronix: Add support for MX35LFxGE4AD")
Cc [email protected] # v5.4.y
Cc Miquel Raynal <[email protected]>

Looks legitimate.

Quoted 20 lines

---
Hello,

This is my third attempt to fix a stable kernel. This patch is not a backport from Linus' tree per-se, but a fix of a backport. The original mainline commit is fine but the backported one is not, we need to fix the backported commit in the 5.4.y stable kernel, and this is what I am attempting to do. Let me know if further explanations are needed.

Regards,
Jaime

---
 drivers/mtd/nand/spi/macronix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/spi/macronix.c +0 -0
index bbb1d68bce4a..f18c6cfe8ff5 100644

drivers/mtd/nand/spi/macronix.c static const struct spinand_info macronix_spinand_table[] = { · line 131

Quoted 8 lines
drivers/mtd/nand/spi/macronix.c +1 -1
@@ -125,7 +125,7 @@ static const struct spinand_info macronix_spinand_table[] = {
 		     SPINAND_HAS_QE_BIT,
 		     SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, NULL)),
 	SPINAND_INFO("MX35LF4GE4AD", 0x37,
-		     NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1),
+		     NAND_MEMORG(1, 4096, 128, 64, 2048, 40, 1, 1, 1),
 		     NAND_ECCREQ(8, 512),
 		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
 					      &write_cache_variants,

Thanks,
Miquèl

maintainer
#2 lore raw
Quoted 50 lines · Miquel Raynal

Hi Jaime,

+ linux-mtd which was missing to your contribution.

[email protected] wrote on Thu, 25 Jan 2024 10:48:16 +0800:

Quoted 8 lines

From: JaimeLiao <[email protected]>

Support for MX35LF{2,4}GE4AD chips was added in mainline through upstream commit 5ece78de88739b4c68263e9f2582380c1fd8314f.

The patch was later adapted to 5.4.y and backported through stable commit 85258ae3070848d9d0f6fbee385be2db80e8cf26.

Quoted 7 lines

Fix the backport mentioned right above as it is wrong: the bigger chip features 4kiB pages and not 2kiB pages.

Fixes 85258ae30708 ("mtd: spinand: macronix: Add support for MX35LFxGE4AD")
Cc [email protected] # v5.4.y
Cc Miquel Raynal <[email protected]>

Looks legitimate.

Quoted 24 lines

---
Hello,

This is my third attempt to fix a stable kernel. This patch is not a backport from Linus' tree per-se, but a fix of a backport. The original mainline commit is fine but the backported one is not, we need to fix the backported commit in the 5.4.y stable kernel, and this is what I am attempting to do. Let me know if further explanations are needed.

Regards,
Jaime

---
 drivers/mtd/nand/spi/macronix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/spi/macronix.c +0 -1
index bbb1d68bce4a..f18c6cfe8ff5 100644
@@ -125,7 +125,7 @@ static const struct spinand_info macronix_spinand_table[] = {
 		     SPINAND_HAS_QE_BIT,
 		     SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, NULL)),
 	SPINAND_INFO("MX35LF4GE4AD", 0x37,
-		     NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1),
Quoted 9 lines

drivers/mtd/nand/spi/macronix.c static const struct spinand_info macronix_spinand_table[] = { · line 131

Quoted 4 lines
drivers/mtd/nand/spi/macronix.c +1 -0
+		     NAND_MEMORG(1, 4096, 128, 64, 2048, 40, 1, 1, 1),
 		     NAND_ECCREQ(8, 512),
 		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
 					      &write_cache_variants,

Thanks,
Miquèl

Now queued up, thanks.

greg k-h