Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8712668ybl; Thu, 16 Jan 2020 23:12:19 -0800 (PST) X-Google-Smtp-Source: APXvYqwL8/UvJC0igMiPwRCtf1wcqQ9R5fO2J3pc5pn0CsOnvE7P7z4GbwRAeVrDLhTBUvpLoul0 X-Received: by 2002:a9d:de9:: with SMTP id 96mr5228805ots.222.1579245139558; Thu, 16 Jan 2020 23:12:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579245139; cv=none; d=google.com; s=arc-20160816; b=MoWv6CS+wGMKtzO20qbi89ZiO4DLeEYuxLxhNZjGkXMI0w2KAJb/AJoKsGwvhJ0JA/ qZ4mjQN0HxGPyotQ87ueVpqjmWvCvv/5I/Y1xmTAD1R8zLx5apgkmuAq5kMUtT+ky8LU 4w230J/imuXcihCMSORPlBA54MZY/yvscaUdpZnkSoCjOJocCQgSkDKyD/YkpFYlCET9 RQEBTR2r5nVSI36v7XO+EBvTtX75uSucWnqxvRtQz+dpIVbZDQAVUjbWw9ZTTJNpBMvn /CWw/WuP67B9GDQYXITnyO3LSWFahCHpAakWDEJC7IFD+qBLViK7veMdW0ewP60IqIvK p17Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=WEj6RTaYwKnskQfaugG07kdgnV3tDlMGtC7/GkJd8qk=; b=0oaT90Zn28GRo2uZD3zpfmuydqe7xVk7Mn6YWp7X5QMfL1c8Vb1xnHWLYXY/2pYssB cnbX0rKbqjMdgk26gZIS1oZY+w409djzFIopojGqGw/kcvQ6Q1QsmPZFxHfANfPyWJ2G tt8aCrBxPyMyNB2L8+mn6pPJeWI4IcZIoiby1bnV99yX6+oYeFcpQUKJuk5HWaZYWIgS CtQHU1krb1ZLX8m7fkgOhXLjLfbdFdw1kvkx//ULfTk7KPfA7rtNs2PgzUPEU8QebHi2 vqygOaNNnZ4VeKjxM4hrNg50mptXhuo6KPFTPOz+rzt7v5FW8TgcuMBEvYO3kEtyvCcg Kw4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13si12750385oij.118.2020.01.16.23.12.07; Thu, 16 Jan 2020 23:12:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729262AbgAQHKp (ORCPT + 99 others); Fri, 17 Jan 2020 02:10:45 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:37425 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729191AbgAQHKo (ORCPT ); Fri, 17 Jan 2020 02:10:44 -0500 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1isLm1-0003Yx-HD; Fri, 17 Jan 2020 08:10:29 +0100 Received: from mfe by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1isLly-0000eh-QS; Fri, 17 Jan 2020 08:10:26 +0100 Date: Fri, 17 Jan 2020 08:10:26 +0100 From: Marco Felsch To: Miquel Raynal Cc: zdhays@gmail.com, zhays@lexmark.com, Richard Weinberger , Vignesh Raghavendra , Frieder Schrempf , Boris Brezillon , Thomas Gleixner , Piotr Sroka , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] mtd: rawnand: micron: don't error out if internal ECC is set Message-ID: <20200117071026.gydlruw2cxre2r2u@pengutronix.de> References: <20200110162503.7185-1-zdhays@gmail.com> <20200116192221.49986c13@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200116192221.49986c13@xps13> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 08:02:50 up 62 days, 22:21, 55 users, load average: 0.07, 0.07, 0.02 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Zak, Miquel, On 20-01-16 19:22, Miquel Raynal wrote: > Hi Zak, > > zdhays@gmail.com wrote on Fri, 10 Jan 2020 11:25:01 -0500: > > > From: Zak Hays > > > > Recent changes to the driver require use of on-die correction if > > the internal ECC enable bit is set. On some Micron parts, this bit > > is enabled by default and there is no method for disabling it. Which changes did you mean here? > > This is a false assumption though as that bit being enabled does not > > necessarily mean that the on-die ECC *has* to be used. It has been > > verified with a Micron FAE that other methods of error correction are > > still valid even if this bit is set. It would be cool if a micron FAE can provide a document with all the quirks and how those quirks can be handled. > > HW ECC offers generally higher performance than on-die so it is > > preferred in some situations. This also allows multiple NAND parts to > > be supported on the same PCB as some parts may not support on-die > > error correction. By HW ECC you mean the host ecc controller? > > With that in mind, only throw a warning that the on-die bit is set > > and allow the init to continue. > > I don't think I can take this patch as-is. We must find a reliable way > to discriminate Micron parts features. If we cannot (I think we can't > before of the endless list of bugs they have introduced without > documenting them), the best way is to build a static table. +1 for 'find a reliable way to discriminate Micron parts features' Regards, Marco > > > > Signed-off-by: Zak Hays > > --- > > drivers/mtd/nand/raw/nand_micron.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/drivers/mtd/nand/raw/nand_micron.c b/drivers/mtd/nand/raw/nand_micron.c > > index 56654030ec7f..ec40c76443be 100644 > > --- a/drivers/mtd/nand/raw/nand_micron.c > > +++ b/drivers/mtd/nand/raw/nand_micron.c > > @@ -455,9 +455,7 @@ static int micron_nand_init(struct nand_chip *chip) > > > > if (ondie == MICRON_ON_DIE_MANDATORY && > > chip->ecc.mode != NAND_ECC_ON_DIE) { > > - pr_err("On-die ECC forcefully enabled, not supported\n"); > > - ret = -EINVAL; > > - goto err_free_manuf_data; > > + pr_warn("WARNING: On-die ECC forcefully enabled, use caution with other methods\n"); > > } > > > > if (chip->ecc.mode == NAND_ECC_ON_DIE) { > > Thanks, > Miqu?l > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |