Re: [PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
On Tue, 2012-08-14 at 22:38 -0400, Huang Shijie wrote: > Just as Artem suggested: > > "Both UBI and JFFS2 are able to read verify what they wrote already. > There are also MTD tests which do this verification. So I think there > is no reason to keep this in the NAND layer, let alone wasting RAM in > the driver to support this feature." > > So kill MTD_NAND_VERIFY_WRITE entirely. > > Signed-off-by: Huang Shijie Pushed to l2-mtd.git, thanks! -- Best Regards, Artem Bityutskiy signature.asc Description: This is a digitally signed message part
Re: [PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
On Tue, 2012-08-14 at 22:38 -0400, Huang Shijie wrote: Just as Artem suggested: Both UBI and JFFS2 are able to read verify what they wrote already. There are also MTD tests which do this verification. So I think there is no reason to keep this in the NAND layer, let alone wasting RAM in the driver to support this feature. So kill MTD_NAND_VERIFY_WRITE entirely. Signed-off-by: Huang Shijie shij...@gmail.com Pushed to l2-mtd.git, thanks! -- Best Regards, Artem Bityutskiy signature.asc Description: This is a digitally signed message part
Re: [PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
Dear Huang Shijie, > 于 2012年08月15日 20:09, Marek Vasut 写道: > > I'd still prefer for this to be rather fixed. It seems to be able to find > > some obvious mistakes etc. > > could you please point out the mistakes? Usual stuff -- flaws in drivers, misbehavior of the chip etc Best regards, Marek Vasut -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
于 2012年08月15日 20:09, Marek Vasut 写道: I'd still prefer for this to be rather fixed. It seems to be able to find some obvious mistakes etc. could you please point out the mistakes? thanks Huang Shijie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
于 2012年08月15日 20:09, Marek Vasut 写道: I'd still prefer for this to be rather fixed. It seems to be able to find some obvious mistakes etc. could you please point out the mistakes? thanks Huang Shijie -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
Dear Huang Shijie, 于 2012年08月15日 20:09, Marek Vasut 写道: I'd still prefer for this to be rather fixed. It seems to be able to find some obvious mistakes etc. could you please point out the mistakes? Usual stuff -- flaws in drivers, misbehavior of the chip etc Best regards, Marek Vasut -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
Dear Huang Shijie, > 于 2012年08月15日 15:06, Shmulik Ladkani 写道: > > Hi Huang, > > > > On Tue, 14 Aug 2012 22:38:45 -0400 Huang Shijie wrote: > >> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig > >> index 588e989..0ca7257 100644 > >> --- a/drivers/mtd/nand/Kconfig > >> +++ b/drivers/mtd/nand/Kconfig > >> @@ -22,15 +22,6 @@ menuconfig MTD_NAND > >> > >> if MTD_NAND > >> > >> -config MTD_NAND_VERIFY_WRITE > >> - bool "Verify NAND page writes" > >> - help > >> -This adds an extra check when data is written to the flash. The > >> -NAND flash device internally checks only bits transitioning > >> -from 1 to 0. There is a rare possibility that even though the > >> -device thinks the write was successful, a bit could have been > >> -flipped accidentally due to device wear or something else. > >> - > > > > There are some defconfig files which set CONFIG_MTD_NAND_VERIFY_WRITE. > > > > I guess you should submit an accompanying patch that removes > > CONFIG_MTD_NAND_VERIFY_WRITE from all defconfig files. > > thanks a lot. > > I will send out a separate patch to fix it. I'd still prefer for this to be rather fixed. It seems to be able to find some obvious mistakes etc. [...] Best regards, Marek Vasut -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
于 2012年08月15日 15:06, Shmulik Ladkani 写道: Hi Huang, On Tue, 14 Aug 2012 22:38:45 -0400 Huang Shijie wrote: diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 588e989..0ca7257 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -22,15 +22,6 @@ menuconfig MTD_NAND if MTD_NAND -config MTD_NAND_VERIFY_WRITE - bool "Verify NAND page writes" - help - This adds an extra check when data is written to the flash. The - NAND flash device internally checks only bits transitioning - from 1 to 0. There is a rare possibility that even though the - device thinks the write was successful, a bit could have been - flipped accidentally due to device wear or something else. - There are some defconfig files which set CONFIG_MTD_NAND_VERIFY_WRITE. I guess you should submit an accompanying patch that removes CONFIG_MTD_NAND_VERIFY_WRITE from all defconfig files. thanks a lot. I will send out a separate patch to fix it. Huang Shijie (also, trimmed the CC list for this specific discussion, seems unrelated to all of the parties) Regards, Shmulik __ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
Hi Huang, On Tue, 14 Aug 2012 22:38:45 -0400 Huang Shijie wrote: > diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig > index 588e989..0ca7257 100644 > --- a/drivers/mtd/nand/Kconfig > +++ b/drivers/mtd/nand/Kconfig > @@ -22,15 +22,6 @@ menuconfig MTD_NAND > > if MTD_NAND > > -config MTD_NAND_VERIFY_WRITE > - bool "Verify NAND page writes" > - help > - This adds an extra check when data is written to the flash. The > - NAND flash device internally checks only bits transitioning > - from 1 to 0. There is a rare possibility that even though the > - device thinks the write was successful, a bit could have been > - flipped accidentally due to device wear or something else. > - There are some defconfig files which set CONFIG_MTD_NAND_VERIFY_WRITE. I guess you should submit an accompanying patch that removes CONFIG_MTD_NAND_VERIFY_WRITE from all defconfig files. (also, trimmed the CC list for this specific discussion, seems unrelated to all of the parties) Regards, Shmulik -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
Hi Huang, On Tue, 14 Aug 2012 22:38:45 -0400 Huang Shijie shij...@gmail.com wrote: diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 588e989..0ca7257 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -22,15 +22,6 @@ menuconfig MTD_NAND if MTD_NAND -config MTD_NAND_VERIFY_WRITE - bool Verify NAND page writes - help - This adds an extra check when data is written to the flash. The - NAND flash device internally checks only bits transitioning - from 1 to 0. There is a rare possibility that even though the - device thinks the write was successful, a bit could have been - flipped accidentally due to device wear or something else. - There are some defconfig files which set CONFIG_MTD_NAND_VERIFY_WRITE. I guess you should submit an accompanying patch that removes CONFIG_MTD_NAND_VERIFY_WRITE from all defconfig files. (also, trimmed the CC list for this specific discussion, seems unrelated to all of the parties) Regards, Shmulik -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
于 2012年08月15日 15:06, Shmulik Ladkani 写道: Hi Huang, On Tue, 14 Aug 2012 22:38:45 -0400 Huang Shijieshij...@gmail.com wrote: diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 588e989..0ca7257 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -22,15 +22,6 @@ menuconfig MTD_NAND if MTD_NAND -config MTD_NAND_VERIFY_WRITE - bool Verify NAND page writes - help - This adds an extra check when data is written to the flash. The - NAND flash device internally checks only bits transitioning - from 1 to 0. There is a rare possibility that even though the - device thinks the write was successful, a bit could have been - flipped accidentally due to device wear or something else. - There are some defconfig files which set CONFIG_MTD_NAND_VERIFY_WRITE. I guess you should submit an accompanying patch that removes CONFIG_MTD_NAND_VERIFY_WRITE from all defconfig files. thanks a lot. I will send out a separate patch to fix it. Huang Shijie (also, trimmed the CC list for this specific discussion, seems unrelated to all of the parties) Regards, Shmulik __ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
Dear Huang Shijie, 于 2012年08月15日 15:06, Shmulik Ladkani 写道: Hi Huang, On Tue, 14 Aug 2012 22:38:45 -0400 Huang Shijieshij...@gmail.com wrote: diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 588e989..0ca7257 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -22,15 +22,6 @@ menuconfig MTD_NAND if MTD_NAND -config MTD_NAND_VERIFY_WRITE - bool Verify NAND page writes - help -This adds an extra check when data is written to the flash. The -NAND flash device internally checks only bits transitioning -from 1 to 0. There is a rare possibility that even though the -device thinks the write was successful, a bit could have been -flipped accidentally due to device wear or something else. - There are some defconfig files which set CONFIG_MTD_NAND_VERIFY_WRITE. I guess you should submit an accompanying patch that removes CONFIG_MTD_NAND_VERIFY_WRITE from all defconfig files. thanks a lot. I will send out a separate patch to fix it. I'd still prefer for this to be rather fixed. It seems to be able to find some obvious mistakes etc. [...] Best regards, Marek Vasut -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
Just as Artem suggested: "Both UBI and JFFS2 are able to read verify what they wrote already. There are also MTD tests which do this verification. So I think there is no reason to keep this in the NAND layer, let alone wasting RAM in the driver to support this feature." So kill MTD_NAND_VERIFY_WRITE entirely. Signed-off-by: Huang Shijie --- drivers/mtd/nand/Kconfig |9 - drivers/mtd/nand/ams-delta.c | 13 drivers/mtd/nand/au1550nd.c | 46 --- drivers/mtd/nand/bcm_umi_nand.c | 22 - drivers/mtd/nand/cafe_nand.c |7 drivers/mtd/nand/cmx270_nand.c | 13 drivers/mtd/nand/diskonchip.c| 63 -- drivers/mtd/nand/fsl_elbc_nand.c | 36 - drivers/mtd/nand/fsl_ifc_nand.c | 41 drivers/mtd/nand/gpio.c | 39 --- drivers/mtd/nand/lpc32xx_slc.c | 19 --- drivers/mtd/nand/mpc5121_nfc.c | 22 - drivers/mtd/nand/mxc_nand.c |9 - drivers/mtd/nand/nand_base.c | 53 drivers/mtd/nand/nandsim.c | 16 - drivers/mtd/nand/ndfc.c | 13 drivers/mtd/nand/nuc900_nand.c | 17 -- drivers/mtd/nand/omap2.c | 23 -- drivers/mtd/nand/pxa3xx_nand.c |7 drivers/mtd/nand/r852.c | 22 - drivers/mtd/nand/sh_flctl.c | 11 -- drivers/mtd/nand/socrates_nand.c | 19 --- drivers/mtd/nand/tmio_nand.c | 13 drivers/mtd/nand/txx9ndfmc.c | 13 include/linux/mtd/nand.h |3 -- 25 files changed, 0 insertions(+), 549 deletions(-) diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 588e989..0ca7257 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -22,15 +22,6 @@ menuconfig MTD_NAND if MTD_NAND -config MTD_NAND_VERIFY_WRITE - bool "Verify NAND page writes" - help - This adds an extra check when data is written to the flash. The - NAND flash device internally checks only bits transitioning - from 1 to 0. There is a rare possibility that even though the - device thinks the write was successful, a bit could have been - flipped accidentally due to device wear or something else. - config MTD_NAND_BCH tristate select BCH diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c index 861ca8f..2d73f23 100644 --- a/drivers/mtd/nand/ams-delta.c +++ b/drivers/mtd/nand/ams-delta.c @@ -103,18 +103,6 @@ static void ams_delta_read_buf(struct mtd_info *mtd, u_char *buf, int len) buf[i] = ams_delta_read_byte(mtd); } -static int ams_delta_verify_buf(struct mtd_info *mtd, const u_char *buf, - int len) -{ - int i; - - for (i=0; iread_byte = ams_delta_read_byte; this->write_buf = ams_delta_write_buf; this->read_buf = ams_delta_read_buf; - this->verify_buf = ams_delta_verify_buf; this->cmd_ctrl = ams_delta_hwcontrol; if (gpio_request(AMS_DELTA_GPIO_PIN_NAND_RB, "nand_rdy") == 0) { this->dev_ready = ams_delta_nand_ready; diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c index 9f609d2..5c47b20 100644 --- a/drivers/mtd/nand/au1550nd.c +++ b/drivers/mtd/nand/au1550nd.c @@ -141,28 +141,6 @@ static void au_read_buf(struct mtd_info *mtd, u_char *buf, int len) } /** - * au_verify_buf - Verify chip data against buffer - * @mtd: MTD device structure - * @buf: buffer containing the data to compare - * @len: number of bytes to compare - * - * verify function for 8bit buswidth - */ -static int au_verify_buf(struct mtd_info *mtd, const u_char *buf, int len) -{ - int i; - struct nand_chip *this = mtd->priv; - - for (i = 0; i < len; i++) { - if (buf[i] != readb(this->IO_ADDR_R)) - return -EFAULT; - au_sync(); - } - - return 0; -} - -/** * au_write_buf16 - write buffer to chip * @mtd: MTD device structure * @buf: data buffer @@ -205,29 +183,6 @@ static void au_read_buf16(struct mtd_info *mtd, u_char *buf, int len) } } -/** - * au_verify_buf16 - Verify chip data against buffer - * @mtd: MTD device structure - * @buf: buffer containing the data to compare - * @len: number of bytes to compare - * - * verify function for 16bit buswidth - */ -static int au_verify_buf16(struct mtd_info *mtd, const u_char *buf, int len) -{ - int i; - struct nand_chip *this = mtd->priv; - u16 *p = (u16 *) buf; - len >>= 1; - - for (i = 0; i < len; i++) { - if (p[i] != readw(this->IO_ADDR_R)) - return -EFAULT; - au_sync(); - } - return 0; -} - /*
[PATCH] mtd: kill MTD_NAND_VERIFY_WRITE
Just as Artem suggested: Both UBI and JFFS2 are able to read verify what they wrote already. There are also MTD tests which do this verification. So I think there is no reason to keep this in the NAND layer, let alone wasting RAM in the driver to support this feature. So kill MTD_NAND_VERIFY_WRITE entirely. Signed-off-by: Huang Shijie shij...@gmail.com --- drivers/mtd/nand/Kconfig |9 - drivers/mtd/nand/ams-delta.c | 13 drivers/mtd/nand/au1550nd.c | 46 --- drivers/mtd/nand/bcm_umi_nand.c | 22 - drivers/mtd/nand/cafe_nand.c |7 drivers/mtd/nand/cmx270_nand.c | 13 drivers/mtd/nand/diskonchip.c| 63 -- drivers/mtd/nand/fsl_elbc_nand.c | 36 - drivers/mtd/nand/fsl_ifc_nand.c | 41 drivers/mtd/nand/gpio.c | 39 --- drivers/mtd/nand/lpc32xx_slc.c | 19 --- drivers/mtd/nand/mpc5121_nfc.c | 22 - drivers/mtd/nand/mxc_nand.c |9 - drivers/mtd/nand/nand_base.c | 53 drivers/mtd/nand/nandsim.c | 16 - drivers/mtd/nand/ndfc.c | 13 drivers/mtd/nand/nuc900_nand.c | 17 -- drivers/mtd/nand/omap2.c | 23 -- drivers/mtd/nand/pxa3xx_nand.c |7 drivers/mtd/nand/r852.c | 22 - drivers/mtd/nand/sh_flctl.c | 11 -- drivers/mtd/nand/socrates_nand.c | 19 --- drivers/mtd/nand/tmio_nand.c | 13 drivers/mtd/nand/txx9ndfmc.c | 13 include/linux/mtd/nand.h |3 -- 25 files changed, 0 insertions(+), 549 deletions(-) diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 588e989..0ca7257 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -22,15 +22,6 @@ menuconfig MTD_NAND if MTD_NAND -config MTD_NAND_VERIFY_WRITE - bool Verify NAND page writes - help - This adds an extra check when data is written to the flash. The - NAND flash device internally checks only bits transitioning - from 1 to 0. There is a rare possibility that even though the - device thinks the write was successful, a bit could have been - flipped accidentally due to device wear or something else. - config MTD_NAND_BCH tristate select BCH diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c index 861ca8f..2d73f23 100644 --- a/drivers/mtd/nand/ams-delta.c +++ b/drivers/mtd/nand/ams-delta.c @@ -103,18 +103,6 @@ static void ams_delta_read_buf(struct mtd_info *mtd, u_char *buf, int len) buf[i] = ams_delta_read_byte(mtd); } -static int ams_delta_verify_buf(struct mtd_info *mtd, const u_char *buf, - int len) -{ - int i; - - for (i=0; ilen; i++) - if (buf[i] != ams_delta_read_byte(mtd)) - return -EFAULT; - - return 0; -} - /* * Command control function * @@ -233,7 +221,6 @@ static int __devinit ams_delta_init(struct platform_device *pdev) this-read_byte = ams_delta_read_byte; this-write_buf = ams_delta_write_buf; this-read_buf = ams_delta_read_buf; - this-verify_buf = ams_delta_verify_buf; this-cmd_ctrl = ams_delta_hwcontrol; if (gpio_request(AMS_DELTA_GPIO_PIN_NAND_RB, nand_rdy) == 0) { this-dev_ready = ams_delta_nand_ready; diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c index 9f609d2..5c47b20 100644 --- a/drivers/mtd/nand/au1550nd.c +++ b/drivers/mtd/nand/au1550nd.c @@ -141,28 +141,6 @@ static void au_read_buf(struct mtd_info *mtd, u_char *buf, int len) } /** - * au_verify_buf - Verify chip data against buffer - * @mtd: MTD device structure - * @buf: buffer containing the data to compare - * @len: number of bytes to compare - * - * verify function for 8bit buswidth - */ -static int au_verify_buf(struct mtd_info *mtd, const u_char *buf, int len) -{ - int i; - struct nand_chip *this = mtd-priv; - - for (i = 0; i len; i++) { - if (buf[i] != readb(this-IO_ADDR_R)) - return -EFAULT; - au_sync(); - } - - return 0; -} - -/** * au_write_buf16 - write buffer to chip * @mtd: MTD device structure * @buf: data buffer @@ -205,29 +183,6 @@ static void au_read_buf16(struct mtd_info *mtd, u_char *buf, int len) } } -/** - * au_verify_buf16 - Verify chip data against buffer - * @mtd: MTD device structure - * @buf: buffer containing the data to compare - * @len: number of bytes to compare - * - * verify function for 16bit buswidth - */ -static int au_verify_buf16(struct mtd_info *mtd, const u_char *buf, int len) -{ - int i; - struct