* nand flash disable ecc @ 2021-08-03 9:42 Ivan Riabtsov 2021-08-03 10:33 ` Ivan Riabtsov 0 siblings, 1 reply; 3+ messages in thread From: Ivan Riabtsov @ 2021-08-03 9:42 UTC (permalink / raw) To: kernelnewbies Hello. Please tell me how to disable ecc checking in nand memory? I only found this: https://www.kernel.org/doc/html/v4.14/driver-api/mtdnand.html#ecc-selection-constants but didn't figure out how to disable ecc checking. What i did: diff -Naur linux-5.10.50_orig/drivers/mtd/nand/raw/nand_base.c linux-5.10.50/drivers/mtd/nand/raw/nand_base.c --- linux-5.10.50_orig/drivers/mtd/nand/raw/nand_base.c 2021-07-14 17:56:55.000000000 +0300 +++ linux-5.10.50/drivers/mtd/nand/raw/nand_base.c 2021-08-03 11:20:41.566988751 +0300 @@ -43,6 +43,7 @@ #include <linux/mtd/partitions.h> #include <linux/of.h> #include <linux/gpio/consumer.h> +#include <linux/printk.h> #include "internals.h" @@ -4902,9 +4903,12 @@ int err; err = of_property_read_string(np, "nand-ecc-mode", &pm); ####### at this point the checkout is turned off, as I assume. Since the debug message in the kernel appears exactly in this place + pr_emerg("!!!!!!!!!!!!err is %d, prop is: %s\n", err, pm); if (err) - return NAND_ECC_ENGINE_TYPE_INVALID; + return NAND_ECC_ENGINE_TYPE_NONE; + /*return NAND_ECC_ENGINE_TYPE_INVALID;*/ + printk(KERN_EMERG "!!!!!!!!!prop is: %s\n", pm); for (eng_type = NAND_ECC_NONE; eng_type < ARRAY_SIZE(nand_ecc_legacy_modes); eng_type++) { if (!strcasecmp(pm, nand_ecc_legacy_modes[eng_type])) { but it doesn't work. Please, tell me, how i can disable ecc checking? _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: nand flash disable ecc 2021-08-03 9:42 nand flash disable ecc Ivan Riabtsov @ 2021-08-03 10:33 ` Ivan Riabtsov 2021-08-03 13:18 ` Ayan Halder 0 siblings, 1 reply; 3+ messages in thread From: Ivan Riabtsov @ 2021-08-03 10:33 UTC (permalink / raw) To: kernelnewbies i turned off checking in dts file but still get the following error message: [ 10.526949] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry [ 10.540822] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry [ 10.554798] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry [ 10.568493] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes [ 10.578964] CPU: 0 PID: 1 Comm: swapper Not tainted 5.10.50 #1 [ 10.585306] Hardware name: Freescale MXS (Device Tree) at the same time I can boot the system with nfs root, write the ubifs image to nand and on the next boot it is successfully mounted automatically, probably the problem is that uboot does not write the image correctly, tell me what can be done, imx28 system, arm processor? вт, 3 авг. 2021 г. в 12:42, Ivan Riabtsov <ivriabtsov@gmail.com>: > > Hello. Please tell me how to disable ecc checking in nand memory? I > only found this: > https://www.kernel.org/doc/html/v4.14/driver-api/mtdnand.html#ecc-selection-constants > but didn't figure out how to disable ecc checking. > What i did: > > diff -Naur linux-5.10.50_orig/drivers/mtd/nand/raw/nand_base.c > linux-5.10.50/drivers/mtd/nand/raw/nand_base.c > --- linux-5.10.50_orig/drivers/mtd/nand/raw/nand_base.c 2021-07-14 > 17:56:55.000000000 +0300 > +++ linux-5.10.50/drivers/mtd/nand/raw/nand_base.c 2021-08-03 > 11:20:41.566988751 +0300 > @@ -43,6 +43,7 @@ > #include <linux/mtd/partitions.h> > #include <linux/of.h> > #include <linux/gpio/consumer.h> > +#include <linux/printk.h> > > #include "internals.h" > > @@ -4902,9 +4903,12 @@ > int err; > > err = of_property_read_string(np, "nand-ecc-mode", &pm); > ####### at this point the checkout is turned off, as I assume. Since > the debug message in the kernel appears exactly in this place > + pr_emerg("!!!!!!!!!!!!err is %d, prop is: %s\n", err, pm); > if (err) > - return NAND_ECC_ENGINE_TYPE_INVALID; > + return NAND_ECC_ENGINE_TYPE_NONE; > + /*return NAND_ECC_ENGINE_TYPE_INVALID;*/ > > + printk(KERN_EMERG "!!!!!!!!!prop is: %s\n", pm); > for (eng_type = NAND_ECC_NONE; > eng_type < ARRAY_SIZE(nand_ecc_legacy_modes); eng_type++) { > if (!strcasecmp(pm, nand_ecc_legacy_modes[eng_type])) { > > but it doesn't work. Please, tell me, how i can disable ecc checking? _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: nand flash disable ecc 2021-08-03 10:33 ` Ivan Riabtsov @ 2021-08-03 13:18 ` Ayan Halder 0 siblings, 0 replies; 3+ messages in thread From: Ayan Halder @ 2021-08-03 13:18 UTC (permalink / raw) To: Ivan Riabtsov, kernelnewbies On 03/08/2021 11:33, Ivan Riabtsov wrote: > i turned off checking in dts file but still get the following error message: > > [ 10.526949] ubi0 warning: ubi_io_read: error -74 (ECC error) while > reading 64 bytes from PEB 0:0, read only 64 bytes, retry > [ 10.540822] ubi0 warning: ubi_io_read: error -74 (ECC error) while > reading 64 bytes from PEB 0:0, read only 64 bytes, retry > [ 10.554798] ubi0 warning: ubi_io_read: error -74 (ECC error) while > reading 64 bytes from PEB 0:0, read only 64 bytes, retry > [ 10.568493] ubi0 error: ubi_io_read: error -74 (ECC error) while > reading 64 bytes from PEB 0:0, read 64 bytes > [ 10.578964] CPU: 0 PID: 1 Comm: swapper Not tainted 5.10.50 #1 > [ 10.585306] Hardware name: Freescale MXS (Device Tree) > > at the same time I can boot the system with nfs root, write the ubifs > image to nand and on the next boot it is successfully mounted > automatically, probably the problem is that uboot does not write the > image correctly, tell me what can be done, imx28 system, arm > processor? > > > вт, 3 авг. 2021 г. в 12:42, Ivan Riabtsov <ivriabtsov@gmail.com>: >> Hello. Please tell me how to disable ecc checking in nand memory? I >> only found this: >> https://www.kernel.org/doc/html/v4.14/driver-api/mtdnand.html#ecc-selection-constants >> but didn't figure out how to disable ecc checking. >> What i did: >> >> diff -Naur linux-5.10.50_orig/drivers/mtd/nand/raw/nand_base.c >> linux-5.10.50/drivers/mtd/nand/raw/nand_base.c >> --- linux-5.10.50_orig/drivers/mtd/nand/raw/nand_base.c 2021-07-14 >> 17:56:55.000000000 +0300 >> +++ linux-5.10.50/drivers/mtd/nand/raw/nand_base.c 2021-08-03 >> 11:20:41.566988751 +0300 >> @@ -43,6 +43,7 @@ >> #include <linux/mtd/partitions.h> >> #include <linux/of.h> >> #include <linux/gpio/consumer.h> >> +#include <linux/printk.h> >> >> #include "internals.h" >> >> @@ -4902,9 +4903,12 @@ >> int err; >> >> err = of_property_read_string(np, "nand-ecc-mode", &pm); >> ####### at this point the checkout is turned off, as I assume. Since >> the debug message in the kernel appears exactly in this place >> + pr_emerg("!!!!!!!!!!!!err is %d, prop is: %s\n", err, pm); >> if (err) >> - return NAND_ECC_ENGINE_TYPE_INVALID; >> + return NAND_ECC_ENGINE_TYPE_NONE; >> + /*return NAND_ECC_ENGINE_TYPE_INVALID;*/ >> >> + printk(KERN_EMERG "!!!!!!!!!prop is: %s\n", pm); >> for (eng_type = NAND_ECC_NONE; >> eng_type < ARRAY_SIZE(nand_ecc_legacy_modes); eng_type++) { >> if (!strcasecmp(pm, nand_ecc_legacy_modes[eng_type])) { >> >> but it doesn't work. Please, tell me, how i can disable ecc checking? Please check the kernel config options. You may need to check the CONFIG_MTD_<>_ECC options and disable them via menuconfig. > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-03 13:23 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-08-03 9:42 nand flash disable ecc Ivan Riabtsov 2021-08-03 10:33 ` Ivan Riabtsov 2021-08-03 13:18 ` Ayan Halder
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.