* [RFC] mtd: nand: Add a STATUS CMD after write verification
@ 2012-04-18 10:20 Bastian Hecht
2012-04-18 10:25 ` Bastian Hecht
0 siblings, 1 reply; 4+ messages in thread
From: Bastian Hecht @ 2012-04-18 10:20 UTC (permalink / raw)
To: linux-mtd; +Cc: Bastian Hecht
When using CONFIG_MTD_NAND_VERIFY_WRITE=y an extra read command is sent
to the NAND chip after writing a page. We need an extra status command
to avoid hick-ups that lead to page write failures.
---
Hello all,
I'm experiencing problems with my current setup and
CONFIG_MTD_NAND_VERIFY_WRITE=y. Usually the command sequence is like
0x70 Status read
0x80 0x10 Page prog
0x70
0x80 0x10 Page prog
0x70
...
When activating write verification there is a read command before the
page prog.
0x80 0x10
0x70
0x0 read
0x80 0x10
0x70
...
This makes my chip write garbage, while the patch fixes it.
Now I wonder if this problem is caused by my NAND chip only, or if this
is a general problem that should be adressed.
---
drivers/mtd/nand/nand_base.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 8a393f9..62d6691 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2101,6 +2101,8 @@ static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip,
if (chip->verify_buf(mtd, buf, mtd->writesize))
return -EIO;
+
+ chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1);
#endif
return 0;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFC] mtd: nand: Add a STATUS CMD after write verification
2012-04-18 10:20 [RFC] mtd: nand: Add a STATUS CMD after write verification Bastian Hecht
@ 2012-04-18 10:25 ` Bastian Hecht
2012-04-27 5:54 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: Bastian Hecht @ 2012-04-18 10:25 UTC (permalink / raw)
To: linux-mtd
2012/4/18 Bastian Hecht <hechtb@googlemail.com>:
> When using CONFIG_MTD_NAND_VERIFY_WRITE=y an extra read command is sent
> to the NAND chip after writing a page. We need an extra status command
> to avoid hick-ups that lead to page write failures.
> ---
>
> Hello all,
>
> I'm experiencing problems with my current setup and
> CONFIG_MTD_NAND_VERIFY_WRITE=y. Usually the command sequence is like
> 0x70 Status read
> 0x80 0x10 Page prog
> 0x70
> 0x80 0x10 Page prog
> 0x70
> ...
>
> When activating write verification there is a read command before the
> page prog.
I've written this unclearly. I mean if we issue multiple page writes,
the page writes are not preceeded by a status read, but by a page read
command from the last verification.
> 0x80 0x10
> 0x70
> 0x0 read
> 0x80 0x10
> 0x70
> ...
> This makes my chip write garbage, while the patch fixes it.
> Now I wonder if this problem is caused by my NAND chip only, or if this
> is a general problem that should be adressed.
> ---
> drivers/mtd/nand/nand_base.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 8a393f9..62d6691 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -2101,6 +2101,8 @@ static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip,
>
> if (chip->verify_buf(mtd, buf, mtd->writesize))
> return -EIO;
> +
> + chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1);
> #endif
> return 0;
> }
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] mtd: nand: Add a STATUS CMD after write verification
2012-04-18 10:25 ` Bastian Hecht
@ 2012-04-27 5:54 ` Artem Bityutskiy
2012-04-27 10:17 ` Bastian Hecht
0 siblings, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2012-04-27 5:54 UTC (permalink / raw)
To: Bastian Hecht; +Cc: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
On Wed, 2012-04-18 at 12:25 +0200, Bastian Hecht wrote:
> 2012/4/18 Bastian Hecht <hechtb@googlemail.com>:
> > When using CONFIG_MTD_NAND_VERIFY_WRITE=y an extra read command is sent
> > to the NAND chip after writing a page. We need an extra status command
> > to avoid hick-ups that lead to page write failures.
> > ---
> >
> > Hello all,
> >
> > I'm experiencing problems with my current setup and
> > CONFIG_MTD_NAND_VERIFY_WRITE=y. Usually the command sequence is like
> > 0x70 Status read
> > 0x80 0x10 Page prog
> > 0x70
> > 0x80 0x10 Page prog
> > 0x70
> > ...
> >
> > When activating write verification there is a read command before the
> > page prog.
>
> I've written this unclearly. I mean if we issue multiple page writes,
> the page writes are not preceeded by a status read, but by a page read
> command from the last verification.
Looks good to me. Could you send the final patch with final commit
message. Probably a small comment in the code is also a good idea.
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] mtd: nand: Add a STATUS CMD after write verification
2012-04-27 5:54 ` Artem Bityutskiy
@ 2012-04-27 10:17 ` Bastian Hecht
0 siblings, 0 replies; 4+ messages in thread
From: Bastian Hecht @ 2012-04-27 10:17 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: linux-mtd
> Looks good to me. Could you send the final patch with final commit
> message. Probably a small comment in the code is also a good idea.
Thanks for taking a look at it. I'll post it in a sec.
> --
> Best Regards,
> Artem Bityutskiy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-27 10:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-18 10:20 [RFC] mtd: nand: Add a STATUS CMD after write verification Bastian Hecht
2012-04-18 10:25 ` Bastian Hecht
2012-04-27 5:54 ` Artem Bityutskiy
2012-04-27 10:17 ` Bastian Hecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox