From s.popov@rsc.bg Tue Apr 28 17:01:43 2009
Received: from sigma.superhosting.bg ([91.196.124.10])
	by stoneboat.aleph1.co.uk with esmtps
	(TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69)
	(envelope-from <s.popov@rsc.bg>) id 1LypkY-0005GM-39
	for yaffs@lists.aleph1.co.uk; Tue, 28 Apr 2009 17:01:43 +0100
Received: from blueice3n1.de.ibm.com ([195.212.29.179] helo=[9.157.146.18])
	by sigma.superhosting.bg with esmtpsa (SSLv3:AES256-SHA:256)
	(Exim 4.69) (envelope-from <s.popov@rsc.bg>) id 1LypkR-0006qz-Oe
	for yaffs@lists.aleph1.co.uk; Tue, 28 Apr 2009 19:01:31 +0300
Message-ID: <49F72859.3050104@rsc.bg>
Date: Tue, 28 Apr 2009 19:01:29 +0300
From: Stanislav Popov <s.popov@rsc.bg>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: yaffs@lists.aleph1.co.uk
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse,
	please include it with any abuse report
X-AntiAbuse: Primary Hostname - sigma.superhosting.bg
X-AntiAbuse: Original Domain - lists.aleph1.co.uk
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - rsc.bg
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-SA-Exim-Connect-IP: 91.196.124.10
X-SA-Exim-Mail-From: s.popov@rsc.bg
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Subject: [Yaffs] NAND + YAFFS2 - bad blocks
X-BeenThere: yaffs@lists.aleph1.co.uk
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: Discussion of YAFFS NAND flash filesystem <yaffs.lists.aleph1.co.uk>
List-Unsubscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/options/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=unsubscribe>
List-Archive: <http://lists.aleph1.co.uk/lurker/list/yaffs.html>
List-Post: <mailto:yaffs@lists.aleph1.co.uk>
List-Help: <mailto:yaffs-request@lists.aleph1.co.uk?subject=help>
List-Subscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=subscribe>
X-List-Received-Date: Tue, 28 Apr 2009 16:01:43 -0000

Hi,

I have 64 MB NAND flash on Jacinto (ARM) board.
I am using the device formatted as one YAFFS2 partition.
My SW ECC from NAND is enabled in the kernel and "useNANDECC" in YAFFS 
is set to 0
(If this is non-zero, then YAFFS will not perform ECC and it is assumed 
that the hardware ECC or specified NAND access functions will perform EC 
checks.)

I found that I have 1000-2000 eraseblocks that were reported as "bad block".
I can see them in u-boot with "nand bad" command and when laoding my 
nand_jacinto driver.
When using the NAND they are getting much more.
Actually they are NOT bad blocks!

I edited the kernel and remove is_bad checking when erasing.
Also I edited the mtd-utils (flash_eraseall) and removed is_bad checking 
when erasing.
So I was able to make low-level format of my NAND flash which also erase 
the bad blocks.
(like 'nand erase scrub' command in u-boot, but I currently I do not 
have such command)
After that I had NO bad blocks.

I made some tests:
I formatted Nand with YAFFS2 FS
-  YAFFS2 ECC + NO NAND ECC - when using fs appeared bad blocks and 
getting more.
-  YAFFS2 NO ECC + NAND SW ECC - when using fs appeared bad blocks and 
getting more.

I formatted Nand with EXT2 FS (ext2 fs is not writing into oob)
-  NAND SW ECC ENABLE - NO bad blocks appeared in the time!!!

So the result is that the issue is in using YAFFS2 + NAND.

Maybe the source of the issue is some YAFFS2 configurations?
Do you have any idea?
It's very critical issue for me.

Thanks and Regards,
Stanislav




