kernel: tolerate using UBI/UBIFS on MLC flash (FS#1830)
[oweals/openwrt.git] / target / linux / generic / hack-4.14 / 420-allow-ubi-mlc-support.patch
1 --- a/drivers/mtd/ubi/build.c
2 +++ b/drivers/mtd/ubi/build.c
3 @@ -851,9 +851,8 @@ int ubi_attach_mtd_dev(struct mtd_info *
4          * will die soon and you will lose all your data.
5          */
6         if (mtd->type == MTD_MLCNANDFLASH) {
7 -               pr_err("ubi: refuse attaching mtd%d - MLC NAND is not supported\n",
8 +               pr_warn("ubi: mtd%d has been identified as a MLC NAND!! - MLC is not supported by UBI and UBIFS and _WILL_ cause corruption in the near future!\n",
9                         mtd->index);
10 -               return -EINVAL;
11         }
12  
13         if (ubi_num == UBI_DEV_NUM_AUTO) {