public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* NAND fail testing
@ 2005-01-13 15:55 David A. Marlin
  2005-01-13 17:48 ` Thomas Gleixner
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: David A. Marlin @ 2005-01-13 15:55 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: MTD List


Is there a simple way (using existing drivers and utilities) to "wear 
out" one byte on a NAND type chip by repeatedly rewriting a single byte 
(single address)?

I want to cause a single byte failure on a chip in order to perform 
tests on erase and write error processing, but I only see how to write a 
'page' of data, not a single address.


Thank you,

d.marlin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NAND fail testing
  2005-01-13 15:55 NAND fail testing David A. Marlin
@ 2005-01-13 17:48 ` Thomas Gleixner
  2005-01-13 17:56   ` David A. Marlin
  2005-01-13 17:52 ` Charles Manning
  2005-01-13 18:12 ` Michael
  2 siblings, 1 reply; 8+ messages in thread
From: Thomas Gleixner @ 2005-01-13 17:48 UTC (permalink / raw)
  To: David A. Marlin; +Cc: MTD List

On Thu, 2005-01-13 at 16:55, David A. Marlin wrote:
> Is there a simple way (using existing drivers and utilities) to "wear 
> out" one byte on a NAND type chip by repeatedly rewriting a single byte 
> (single address)?
> 
> I want to cause a single byte failure on a chip in order to perform 
> tests on erase and write error processing, but I only see how to write a 
> 'page' of data, not a single address.
> 

We have blocked the access to short writes. You can do the following:

Erase a block from userspace with flash_erase
Write a page of all 0xff except one byte to the first page using
nandwrite

Repeat until you get an error

tglx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NAND fail testing
  2005-01-13 15:55 NAND fail testing David A. Marlin
  2005-01-13 17:48 ` Thomas Gleixner
@ 2005-01-13 17:52 ` Charles Manning
  2005-01-13 18:11   ` David A. Marlin
  2005-01-13 18:12 ` Michael
  2 siblings, 1 reply; 8+ messages in thread
From: Charles Manning @ 2005-01-13 17:52 UTC (permalink / raw)
  To: David A. Marlin, Thomas Gleixner; +Cc: MTD List

I suggest you read the Toshiba NAND design guide before you try things like 
this. Google for "toshiba nand flash applications design guide"

NAND is always written in a per-page mode, even if you only change a single 
byte. Attempting what you propose will not only wear the single byte, but 
will wear the whole page and block.

IMHO the best way to do testing is to emulate a device in RAM. It is 
relatively simple to modify RAM contents and force the higher level to do its 
test stuff. Trying to do it with a real hardware failure will take a long 
time and is far harder to reproduce etc.


On Friday 14 January 2005 04:55, David A. Marlin wrote:
> Is there a simple way (using existing drivers and utilities) to "wear
> out" one byte on a NAND type chip by repeatedly rewriting a single byte
> (single address)?
>
> I want to cause a single byte failure on a chip in order to perform
> tests on erase and write error processing, but I only see how to write a
> 'page' of data, not a single address.
>
>
> Thank you,
>
> d.marlin
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NAND fail testing
  2005-01-13 17:48 ` Thomas Gleixner
@ 2005-01-13 17:56   ` David A. Marlin
  2005-01-13 18:15     ` Thomas Gleixner
  0 siblings, 1 reply; 8+ messages in thread
From: David A. Marlin @ 2005-01-13 17:56 UTC (permalink / raw)
  To: tglx; +Cc: MTD List


Thomas Gleixner wrote:

> 
> We have blocked the access to short writes. You can do the following:
> 
> Erase a block from userspace with flash_erase
> Write a page of all 0xff except one byte to the first page using
> nandwrite
> 
> Repeat until you get an error

Would this not still 'write' all bytes in the page (even though they are 
0xff and unchanged), causing them to also wear and possibly fail?


d.marlin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NAND fail testing
  2005-01-13 17:52 ` Charles Manning
@ 2005-01-13 18:11   ` David A. Marlin
  0 siblings, 0 replies; 8+ messages in thread
From: David A. Marlin @ 2005-01-13 18:11 UTC (permalink / raw)
  To: manningc2; +Cc: Thomas Gleixner, MTD List


Charles:

Thank you for your reply.  Some additional information, the chips I am 
using are Renesas AG-AND (HN29V1G91T-30).  It was a note from Renesas 
that suggested this approach to permit erase/write fail testing.  I 
think this chip permits a "Random Data Input" operation that would 
permit writing a single byte, but I need to confirm this.  Since this 
does not appear to be a feature shared with other NAND/AND chips, it 
seems I may not be able to use our current driver/utilities to 
accomplish it (without modification).

Charles Manning wrote:
> I suggest you read the Toshiba NAND design guide before you try things like 
> this. Google for "toshiba nand flash applications design guide"
> 
> NAND is always written in a per-page mode, even if you only change a single 
> byte. Attempting what you propose will not only wear the single byte, but 
> will wear the whole page and block.
> 
> IMHO the best way to do testing is to emulate a device in RAM. It is 
> relatively simple to modify RAM contents and force the higher level to do its 
> test stuff. Trying to do it with a real hardware failure will take a long 
> time and is far harder to reproduce etc.

Agreed, but part of the testing is reading error status information back 
from the chips after the erase/write fail and determining if hardware 
ECC is possible.  I have not tried to emulate this device in RAM, but I 
don't think it is a viable option for me since producing and reading 
these error codes are part of the testing I need to perform.


Thanks again,

d.marlin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NAND fail testing
  2005-01-13 15:55 NAND fail testing David A. Marlin
  2005-01-13 17:48 ` Thomas Gleixner
  2005-01-13 17:52 ` Charles Manning
@ 2005-01-13 18:12 ` Michael
  2 siblings, 0 replies; 8+ messages in thread
From: Michael @ 2005-01-13 18:12 UTC (permalink / raw)
  To: David A. Marlin; +Cc: MTD List

> 
> Is there a simple way (using existing drivers and utilities) to
> "wear out" one byte on a NAND type chip by repeatedly rewriting a
> single byte (single address)?

As I understand, you can write over an already-written page with
new values.  Could you continually write the same data to a page,
except for the byte that you want to wear out?

I think because of the way NAND works, with a 512 byte buffer that
goes all at once into NAND that you can't do much other than
something like this.

Mike

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NAND fail testing
  2005-01-13 17:56   ` David A. Marlin
@ 2005-01-13 18:15     ` Thomas Gleixner
  2005-01-13 18:24       ` Artem B. Bityuckiy
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Gleixner @ 2005-01-13 18:15 UTC (permalink / raw)
  To: David A. Marlin; +Cc: MTD List

On Thu, 2005-01-13 at 18:56, David A. Marlin wrote:
> Thomas Gleixner wrote:
> 
> > 
> > We have blocked the access to short writes. You can do the following:
> > 
> > Erase a block from userspace with flash_erase
> > Write a page of all 0xff except one byte to the first page using
> > nandwrite
> > 
> > Repeat until you get an error
> 
> Would this not still 'write' all bytes in the page (even though they are 
> 0xff and unchanged), causing them to also wear and possibly fail?

Since the write is only from 1 -> 0 the page write command always
"writes" all bytes regardless of the number of bytes you have supplied
before. 

tglx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NAND fail testing
  2005-01-13 18:15     ` Thomas Gleixner
@ 2005-01-13 18:24       ` Artem B. Bityuckiy
  0 siblings, 0 replies; 8+ messages in thread
From: Artem B. Bityuckiy @ 2005-01-13 18:24 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: MTD List

On Thu, 13 Jan 2005, Thomas Gleixner wrote:

> On Thu, 2005-01-13 at 18:56, David A. Marlin wrote:
> > Thomas Gleixner wrote:
> > 
> > > 
> > > We have blocked the access to short writes. You can do the following:
> > > 
> > > Erase a block from userspace with flash_erase
> > > Write a page of all 0xff except one byte to the first page using
> > > nandwrite
> > > 
> > > Repeat until you get an error
> > 
> > Would this not still 'write' all bytes in the page (even though they are 
> > 0xff and unchanged), causing them to also wear and possibly fail?
> 
> Since the write is only from 1 -> 0 the page write command always
> "writes" all bytes regardless of the number of bytes you have supplied
> before. 
Even with taking into account this, we can not just safely rewrite the 
same page lots of times. If we do so, we can not assume anything about its 
content, even if we write the same every time. Correct me if I'm wrong.

> 
> tglx
> 
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 

--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-01-13 18:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-13 15:55 NAND fail testing David A. Marlin
2005-01-13 17:48 ` Thomas Gleixner
2005-01-13 17:56   ` David A. Marlin
2005-01-13 18:15     ` Thomas Gleixner
2005-01-13 18:24       ` Artem B. Bityuckiy
2005-01-13 17:52 ` Charles Manning
2005-01-13 18:11   ` David A. Marlin
2005-01-13 18:12 ` Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox