From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Sc1tr-0005bV-JJ for linux-mtd@lists.infradead.org; Tue, 05 Jun 2012 22:06:52 +0000 Date: Wed, 6 Jun 2012 00:06:47 +0200 From: Sascha Hauer To: linux-mtd@lists.infradead.org Subject: flash bbt broken due to unitialized bitflip_threshold? Message-ID: <20120605220647.GV30400@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cc: Artem Bityutskiy , Mike Dunn List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi All, nand_scan_tail calls chip->scan_bbt which in case of a flash based bbt calls mtd_read. mtd_read returns -EUCLEAN when the number of errors exceeds bitflip_threshold. The problem is that bitflip_threshold is uninitialized at that time, it is initialized in add_mtd_device which is called after nand_scan. This is seen on the mxc_nand controller, but probably on other drivers aswell. Am I missing something? Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |