[openwrt/openwrt] ath79: ar934x: still advertise subpage on soft ecc

LEDE Commits lede-commits at lists.infradead.org
Sat May 13 15:09:13 PDT 2023


chunkeey pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/cb9ccd644bf986d5c23e40dda92576d36a1d3b1b

commit cb9ccd644bf986d5c23e40dda92576d36a1d3b1b
Author: Christian Lamparter <chunkeey at gmail.com>
AuthorDate: Sat Jul 31 03:33:03 2021 +0200

    ath79: ar934x: still advertise subpage on soft ecc
    
    This sort of reverts Koen Vandeputte's commit
    6561ca1fa51 ("ath79: ar934x: fix mounting issues if subpage is not supported")
    
    since it does not work on the MR18 as the UBI is coming from
    Meraki in that way and it used to work with AR71XX before.
    
    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c b/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
index fafb3f56b8..28bdcb066d 100644
--- a/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
+++ b/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
@@ -1325,10 +1325,10 @@ static int ar934x_nfc_attach_chip(struct nand_chip *nand)
 	if (ret)
 		return ret;
 
-	if (mtd->writesize == 2048)
-		nand->options |= NAND_NO_SUBPAGE_WRITE;
-
 	if (nand->ecc.engine_type == NAND_ECC_ENGINE_TYPE_ON_HOST) {
+		if (mtd->writesize == 2048)
+			nand->options |= NAND_NO_SUBPAGE_WRITE;
+
 		ret = ar934x_nfc_setup_hwecc(nfc);
 		if (ret)
 			return ret;




More information about the lede-commits mailing list