From patchwork Tue May 8 12:33:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: mtd oob test is failing consistently at same places in NAND flash From: "Philip, Avinash" X-Patchwork-Id: 157675 Message-Id: <518397C60809E147AF5323E0420B992E3E934BF1@DBDE01.ent.ti.com> To: "linux-mtd@lists.infradead.org" Date: Tue, 8 May 2012 12:33:06 +0000 Hi, We are having an 8-bit NAND part (MT29F2G08ABAEAWP from Micron) connected to GPMC Module (General purpose memory controller) from TI. We have been seeing mtd_oobtest failure on a partition size of 248 MB. Most of the time, test case 2 of mtd_oobtest is failing. On debugging further it seems that bit flip is happening on the test case 2 in OOB area. It is observed that the failure locations are consistent. To verify further we had tried writing zeros to OOB area and read it back. This test is passing and confirms that all OOB bits (that are programmable) are not bad. To test further I had modified the mtd_oobtest.c as follows and found this test is passing Is this behavior due to bits getting corrupted on certain sequence? Is this issue observed by anyone else? Thanks & Regards Avinash Philip diff --git a/drivers/mtd/tests/mtd_oobtest.c b/drivers/mtd/tests/mtd_oobtest.c index 933f7e5..9f118de 100644 --- a/drivers/mtd/tests/mtd_oobtest.c +++ b/drivers/mtd/tests/mtd_oobtest.c @@ -50,7 +50,7 @@ static unsigned long next = 1; static inline unsigned int simple_rand(void) { - next = next * 1103515245 + 12345; + next = next * 1103515244 + 12345; /* 45 -> 44. Sequence is changed */ return (unsigned int)((next / 65536) % 32768); }