From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16890C64E8A for ; Wed, 2 Dec 2020 08:00:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A6F2C20C56 for ; Wed, 2 Dec 2020 08:00:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728868AbgLBIAe convert rfc822-to-8bit (ORCPT ); Wed, 2 Dec 2020 03:00:34 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:36479 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726532AbgLBIAe (ORCPT ); Wed, 2 Dec 2020 03:00:34 -0500 X-Originating-IP: 91.224.148.103 Received: from xps13 (unknown [91.224.148.103]) (Authenticated sender: miquel.raynal@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 0FF491C0005; Wed, 2 Dec 2020 07:59:50 +0000 (UTC) Date: Wed, 2 Dec 2020 08:59:48 +0100 From: Miquel Raynal To: Chris Packham Cc: "richard@nod.at" , Vignesh R , "boris.brezillon@collabora.com" , "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: orion-nand: uncorrectable ECC error on v5.10-rc6 Message-ID: <20201202085948.038efb3e@xps13> In-Reply-To: References: Organization: Bootlin X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chris, Chris Packham wrote on Wed, 2 Dec 2020 07:47:32 +0000: > Hi, > > I've just booted v5.10-rc6 on a kirkwood based board (which uses the > orion-nand driver) and I get the following errors reported. I haven't > started bisecting yet but v5.7.19 mounts the nand flash without any issue. > > ubi0: attaching mtd0 > __nand_correct_data: uncorrectable ECC error > ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes > from PEB 0:0, read only 64 bytes, retry > __nand_correct_data: uncorrectable ECC error > ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes > from PEB 0:0, read only 64 bytes, retry > __nand_correct_data: uncorrectable ECC error > ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes > from PEB 0:0, read only 64 bytes, retry > __nand_correct_data: uncorrectable ECC error > ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes > from PEB 0:0, read 64 bytes > CPU: 0 PID: 101 Comm: ubiattach Not tainted 5.10.0-rc6+ #1 > Hardware name: Marvell Kirkwood (Flattened Device Tree) > [<8010ca64>] (unwind_backtrace) from [<80109bd0>] (show_stack+0x10/0x14) > [<80109bd0>] (show_stack) from [<8045f10c>] (ubi_io_read+0x184/0x304) > [<8045f10c>] (ubi_io_read) from [<8045f4ac>] (ubi_io_read_ec_hdr+0x44/0x240) > [<8045f4ac>] (ubi_io_read_ec_hdr) from [<80464db0>] > (ubi_attach+0x178/0x15fc) > [<80464db0>] (ubi_attach) from [<80458d8c>] (ubi_attach_mtd_dev+0x538/0xb48) > [<80458d8c>] (ubi_attach_mtd_dev) from [<8045a114>] > (ctrl_cdev_ioctl+0x170/0x1e0) > [<8045a114>] (ctrl_cdev_ioctl) from [<80203094>] (sys_ioctl+0x1f8/0x990) > [<80203094>] (sys_ioctl) from [<80100060>] (ret_fast_syscall+0x0/0x50) > Exception stack(0x87633fa8 to 0x87633ff0) > 3fa0:                   00000003 7e9b0c30 00000003 40186f40 7e9b0c30 > 00000000 > 3fc0: 00000003 7e9b0c30 000148f8 00000036 00014770 00013f90 76f3dfa4 > 00000000 > 3fe0: 76e936f0 7e9b0c1c 00011f68 76e936fc I recently contributed a pile of fixes to ensure DT parsing was not broken and this applies to Orion. Can you please check mtd: rawnand: orion: Move the ECC initialization to ->attach_chip() And tell me if you see something wrong there? I assumed this driver was not supporting on host ECC engines and only soft Hamming was used, is this assumption wrong? Thanks, Miquèl