Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757496AbdLQSHt (ORCPT ); Sun, 17 Dec 2017 13:07:49 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:34841 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752392AbdLQSHs (ORCPT ); Sun, 17 Dec 2017 13:07:48 -0500 Date: Sun, 17 Dec 2017 19:07:46 +0100 From: Boris Brezillon To: Willy Tarreau Cc: Ezequiel Garcia , Robert Jarzmik , "linux-mtd@lists.infradead.org" , linux-arm-kernel , "linux-kernel@vger.kernel.org" Subject: Re: pxa3xx_nand times out in 4.14 with JFFS2 Message-ID: <20171217190746.2a61232c@bbrezillon> In-Reply-To: <20171217162342.GA1833@1wt.eu> References: <20171217120503.GA3323@1wt.eu> <20171217155305.16c5bb4f@bbrezillon> <20171217150043.GA1403@1wt.eu> <20171217162342.GA1833@1wt.eu> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1601 Lines: 35 On Sun, 17 Dec 2017 17:23:42 +0100 Willy Tarreau wrote: > On Sun, Dec 17, 2017 at 12:53:36PM -0300, Ezequiel Garcia wrote: > > If not too much to ask, this is the test that I believe is needed. > > You seem to have a setup ready, hence why I'm asking you, if > > possible, to give it a shot. > > > > (1) Scrub the BBT from the NAND. Or scrub the whole NAND. > > You cannot do this from the kernel, it needs to be done from the bootloader. > > > > (2) Mark a couple blocks as bad using the OOB -- AFAICR, there > > was a command to do this in the bootloader. > > > > (3) Boot, let Linux create the BBT and see if it catches the bad blocks. > > Are the current boot loaders safe regarding the scrub operation ? I'm > asking because that's how I bricked my mirabox a few years ago when > trying to mark a bad block from u-boot :-/ If someone has a good > knowledge of these commands to limit the risk and helps me only playing > with a small part at the end of the flash (or in the unused area) I'd > prefer it :-) > > > This would guarantee that devices with factory bad blocks, > > (and no BBT), would be OK with this patch. > > I see. I'm fine with trying provided I have reasonably good assurance > that I won't have to go through the kwboot pain again :-/ There's a easy test you can do without scrubing the NAND: 1/ comment the nand-on-flash-bbt property in your DT (this will trigger a full scan) 2/ from u-boot (before booting the kernel), erase a block that you know contains nothing important 3/ during the kernel scan, make sure this block is not reported as bad