Disable Subpage nand write when using Atmel PMECC
PATCH 1/1 Disable Subpage nand write when using Atmel PMECC
Crash detected on sam5d35 and its pmecc nand ecc controller.
The problem was a call to chip->ecc.hwctl from nand_write_subpage_hwecc (nand_base.c) when we write a sub page.chip->ecc.hwctl function is not set when we are using PMECC controller. As a workaround, set NAND_NO_SUBPAGE_WRITE for PMECC controller in order to disable sub page access in nand_write_page.
--- drivers/mtd/nand/atmel_nand.c | 1 + 1 file changed, 1 insertion(+)
drivers/mtd/nand/atmel_nand.c +1 -0
@@ -1220,6 +1220,7 @@ static int atmel_pmecc_nand_init_params(struct platform_device *pdev, goto err; } + nand_chip->options |=NAND_NO_SUBPAGE_WRITE ; nand_chip->ecc.read_page = atmel_nand_pmecc_read_page; nand_chip->ecc.write_page = atmel_nand_pmecc_write_page;
Signature · 1 line
1.7.9.5
PATCH 1/1 Disable Subpage nand write when using Atmel PMECC
Dear Herve
I add the Brian in the email, who is the maintainer of the mtd.
Quoted 10 lines · Herve Codina
Crash detected on sam5d35 and its pmecc nand ecc controller.
The problem was a call to
chip->ecc.hwctlfromnand_write_subpage_hwecc(nand_base.c) when we write a sub page.chip->ecc.hwctlfunction is not set when we are using PMECC controller. As a workaround, setNAND_NO_SUBPAGE_WRITEfor PMECC controller in order to disable sub page access innand_write_page.Signed-off-by Herve Codina <[email protected]>
Quoted 9 lines
--- drivers/mtd/nand/atmel_nand.c | 1 + 1 file changed, 1 insertion(+)drivers/mtd/nand/atmel_nand.c +0
-0
drivers/mtd/nand/atmel_nand.c static int atmel_pmecc_nand_init_params(struct platform_device *pdev, · line 1226
Quoted 7 lines
drivers/mtd/nand/atmel_nand.c +1
-0@@ -1220,6 +1220,7 @@ static int atmel_pmecc_nand_init_params(struct platform_device *pdev, goto err; } + nand_chip->options |=NAND_NO_SUBPAGE_WRITE ; nand_chip->ecc.read_page = atmel_nand_pmecc_read_page; nand_chip->ecc.write_page = atmel_nand_pmecc_write_page;
Best Regards,
Josh Wu
Brian Norris
AppliedPATCH 1/1 Disable Subpage nand write when using Atmel PMECC
Quoted 10 lines · Josh Wu
Quoted 9 lines · Herve Codina
Crash detected on sam5d35 and its pmecc nand ecc controller.
The problem was a call to
chip->ecc.hwctlfromnand_write_subpage_hwecc(nand_base.c) when we write a sub page.chip->ecc.hwctlfunction is not set when we are using PMECC controller. As a workaround, setNAND_NO_SUBPAGE_WRITEfor PMECC controller in order to disable sub page access innand_write_page.
Quoted 3 lines
Quoted 1 line
Signed-off-by Herve Codina <[email protected]>Acked-by Josh Wu <[email protected]>
Pushed to l2-mtd.git. Thanks!
Brian
PATCH 1/1 Disable Subpage nand write when using Atmel PMECC
Hi, Brian
Quoted 11 lines · Brian Norris
Quoted 10 lines · Josh Wu
Quoted 9 lines · Herve Codina
Crash detected on sam5d35 and its pmecc nand ecc controller.
The problem was a call to
chip->ecc.hwctlfromnand_write_subpage_hwecc(nand_base.c) when we write a sub page.chip->ecc.hwctlfunction is not set when we are using PMECC controller. As a workaround, setNAND_NO_SUBPAGE_WRITEfor PMECC controller in order to disable sub page access innand_write_page.
Quoted 3 lines
Quoted 2 lines
Quoted 1 line
Signed-off-by Herve Codina <[email protected]>Acked-by Josh Wu <[email protected]>Pushed to l2-mtd.git. Thanks!
Sorry for the later thought. But I think this patch should go to the stable Linux branch
since any subpage write will cause crash in SAMA5D3 and AT91SAM9X5. So is it possible to add a tag: "Cc: stable at vger.kernel.org" for this commit?
Best Regards,
Josh Wu
Quoted 2 lines
Brian
PATCH 1/1 Disable Subpage nand write when using Atmel PMECC
Quoted 13 lines · Josh Wu
Quoted 12 lines · Brian Norris
Quoted 11 lines · Josh Wu
Quoted 10 lines · Herve Codina
Crash detected on sam5d35 and its pmecc nand ecc controller.
The problem was a call to
chip->ecc.hwctlfromnand_write_subpage_hwecc(nand_base.c) when we write a sub page.chip->ecc.hwctlfunction is not set when we are using PMECC controller. As a workaround, setNAND_NO_SUBPAGE_WRITEfor PMECC controller in order to disable sub page access innand_write_page.Signed-off-by Herve Codina <[email protected]>
Quoted 8 lines
Quoted 2 lines
Quoted 1 line
Acked-by Josh Wu <[email protected]>Pushed to l2-mtd.git. Thanks!
Sorry for the later thought. But I think this patch should go to the stable Linux branch
since any subpage write will cause crash in SAMA5D3 and AT91SAM9X5. So is it possible to add a tag: "Cc: stable at vger.kernel.org" for this commit?
Done, thanks for mentioning it! I was thinking of this when I applied it, actually.
Brian