Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp90720imm; Fri, 6 Jul 2018 14:38:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfOl/4+ljLWwRVctLdfMPlCFYD+Vs3aD/37kzUM+ZiPKc3HcBPLlKwKSzlxT5kWtbioBS85 X-Received: by 2002:a63:66c7:: with SMTP id a190-v6mr10589888pgc.411.1530913136470; Fri, 06 Jul 2018 14:38:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530913136; cv=none; d=google.com; s=arc-20160816; b=H/GbFUV5ChgfALYq4OtIbvfa+eLKZOrl8EqZsQQSzoTQFs5V4434teMEMRUWS6ZeE/ OV63t5DFF6Uk3tTkHVlo7o/h/0jXZQS5dbOHGe/OWLRSXyKIzA6XaJzag5qqnHHALYAK w6vS1E+K+178d1Gt1ViCEqS5gKfMmpVeLgzzzvlN+2I73AOEnxRPQyFxFRvTEJL5Aw9+ bkH1gqRZmJgA0au77sSGU4B3j2PsaANbNOdaE/mMTqCESqKmIk+oBixKMpCRiAJALAsM FCpcDfTmTppokf5HHQ6HADVHpk+6R19hC0mscRfsikF+mNYpLVcrwYPZNqxb8i3txTD5 Bzqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=T6s+hmeaepdZw+qFtAbf5bkgsIA6AvBFM+8goA7lhYY=; b=YYEyWagkw7t/3E7mMg7gwLf9IV27JVYX6cA8wKDHRC+UREbI/wpxdr/b94gLXUFR3i obpxHxs6oU30PCnZqvWFQzw4cSkJhVOjFQsckWUZOq5FKReA6gdiywOXMi2rP72jMBmp HaF1a2y9T29aF314XW+UhGejYBzXkl/nQ81GVF/PVA1jYselYb2OOani9q2g3X2i+J9V HSLTzWDLe4ZOOaP7AWtnE1bj0xiXzgDrxj9QA2rL8fDozs32L8xVR23ioIIBw9hSlezv wKbPWGyfe06VhO3o8syGG2JJdOthZm1x22EId3jUeu0BtisgvnIq+Q1FKukjBQZH8NG2 NWpw== 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 h189-v6si8119766pge.66.2018.07.06.14.38.42; Fri, 06 Jul 2018 14:38:56 -0700 (PDT) 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 S1754247AbeGFVhO (ORCPT + 99 others); Fri, 6 Jul 2018 17:37:14 -0400 Received: from mail.bootlin.com ([62.4.15.54]:46003 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754151AbeGFVhN (ORCPT ); Fri, 6 Jul 2018 17:37:13 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id C83FB2072D; Fri, 6 Jul 2018 23:37:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 80D16206DE; Fri, 6 Jul 2018 23:37:00 +0200 (CEST) Date: Fri, 6 Jul 2018 23:37:01 +0200 From: Boris Brezillon To: Chris Packham Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com, computersforpeace@gmail.com, dwmw2@infradead.org, "Bean Huo \(beanhuo\)" Subject: Re: [PATCH v6 0/6] mtd: rawnand: support MT29F1G08ABAFAWP-ITE:F Message-ID: <20180706233701.05da0666@bbrezillon> In-Reply-To: <20180706212720.0e9dacb8@bbrezillon> References: <20180624224448.21872-1-chris.packham@alliedtelesis.co.nz> <20180706212720.0e9dacb8@bbrezillon> X-Mailer: Claws Mail 3.15.0-dirty (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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 Jul 2018 21:27:20 +0200 Boris Brezillon wrote: > On Mon, 25 Jun 2018 10:44:42 +1200 > Chris Packham wrote: > > > Hi, > > > > I'm looking at adding support for the Micron MT29F1G08ABAFAWP-ITE:F chip > > Hm, it's even worse than I thought. The model name does not include the > -ITE suffix (E means ECC can't be disabled), which means we have no way > to detect the version with forced on-die ECC. > > I see 2 solutions to this problem: > 1/ Bean provides us a solution to reliably detect when ECC can be > de-actived and when it can't > 2/ We only ever expose 64 bytes of OOB to the user and consider that > ECC can be disabled, even if it can't in reality > After reading the doc again, I forgot one thing you can try before deciding to go for option #2. 8th bit in byte 5 of READID's result encodes whether the on-die ECC state (enabled or not). I remember we had a discussion with Bean where he told us this was a runtime status reflecting the on-die ECC state, which is crazy, since READID might return different values depending on the NAND state, and most of the code in the core assumes READID provides a fixed ID that encodes the chip characteristics/capabilities, not its state. Anyway, if this bit is actually reflecting the on-die ECC state and on-die cannot be disabled on your chip, it should stay at 1 even after you have sent the SET_FEATURES(DISABLE_ECC) command. Let's hope this works as I expect, otherwise we're back to option #2 until Bean suggest something else.