ar71xx: Fix UBIFS work on Mikrotik RB95x devices
authorSergey Sergeev <adron@yapic.net>
Wed, 31 May 2017 08:00:01 +0000 (11:00 +0300)
committerFelix Fietkau <nbd@nbd.name>
Wed, 31 May 2017 09:36:21 +0000 (11:36 +0200)
If nand chip has no NAND_NO_SUBPAGE_WRITE flag on its options
ubifs can't use it mtd devices and the kernel crashes with error:
__nand_correct_data: uncorrectable ECC error

Signed-off-by: Sergey Sergeev <adron@yapic.net>
target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c

index 05e15e77e1132e5e0a426a87a52ecee0f834bd07..e940d6cc119b99ff6a48b7b98b8008043ab9b9ec 100644 (file)
@@ -165,6 +165,8 @@ static int rb95x_nand_scan_fixup(struct mtd_info *mtd)
                chip->ecc.layout = &rb95x_nand_ecclayout;
        }
 
+       chip->options = NAND_NO_SUBPAGE_WRITE;
+
        return 0;
 }