Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp713787imm; Mon, 9 Jul 2018 09:17:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpex2g24CqZr+E4Ei0TX1DmhYxaFVuYuJsUEsS5qGWI25OspYZI7uE2R4sO4Y1oX654b+Mqi X-Received: by 2002:a63:2404:: with SMTP id k4-v6mr19234790pgk.191.1531153028868; Mon, 09 Jul 2018 09:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531153028; cv=none; d=google.com; s=arc-20160816; b=YvpEMrvhiBRWzDS9gHyYx2M5TH5ZjS1DPq3KNElQOFJyTaLSMeC7Hi7KUzbORoIyU5 ADPLdzm+xGyKqXEVyriEbqOwrlY6VNoeNCncFRj1lTeNJmW9ye4Qn7ISqi6xGKFHhyul yHcrjr0lrR+vsEplnAvt4eQYTi/tje/hOl1TsHovg85F7P3nrOs18dCxx4H1gzaz0AaI tT5GtPUA9XyumsDm8IJTc2JhmSz5ooCfYs4vs3jRIbv0hug7qVayiBj5LdGeIMXjqmdN zutQ80PR0DCNBsFUb2TTsXLkCi1I9fRkb6AknQ0s1mQvBGeN3OPrI55/coo99tdHzmgn 4dPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=GXBZJW/fY/jZ+UP69WXggDVWAZxtmXfnmI5Atffb34U=; b=UR4gnxSmfrffDdZQ/lCwHvU6IMdEDZxZK6Te6LM4KtiucwBsLqzvmzXKW1VNq5GsbQ byKkMjTs+hICzGSqbXICHRW0vPyBtGwlsltHDfo41FzFa5hwQiBROZrd0ck4qt/jBzpI yx1eDEtKsYZqqsfy6r7VFS8Hoe7MxQqFolYwwjvj3XUDMdQ2kSrSZ6Sp9jUqh3i+GFk3 zuouvYLcJcz7gYJGARAkyUzvVGGc0qaH3AhQvPyfKnwhANfrxViE6Sb+aNo7ylpkQ+63 IhqKJRKcjQ6LOOBiZZXCsJXUK7a473KcZ1pED2Uh1IMR7Hmb6wIicz9EgChHUewRMKQU eQ8A== 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 67-v6si6981874pfc.21.2018.07.09.09.16.54; Mon, 09 Jul 2018 09:17:08 -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 S933593AbeGIQPc convert rfc822-to-8bit (ORCPT + 99 others); Mon, 9 Jul 2018 12:15:32 -0400 Received: from mailout.micron.com ([137.201.242.129]:47805 "EHLO mailout.micron.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932806AbeGIQPa (ORCPT ); Mon, 9 Jul 2018 12:15:30 -0400 X-Greylist: delayed 1226 seconds by postgrey-1.27 at vger.kernel.org; Mon, 09 Jul 2018 12:15:29 EDT Received: from mail.micron.com (bowex36d.micron.com [137.201.85.223]) by mailout.micron.com (8.14.4/8.14.6) with ESMTP id w69FsJrV017377; Mon, 9 Jul 2018 09:54:19 -0600 Received: from SIWEX4G.sing.micron.com (10.160.29.139) by bowex36d.micron.com (137.201.85.223) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 9 Jul 2018 09:54:18 -0600 Received: from SIWEX5A.sing.micron.com (10.160.29.59) by SIWEX4G.sing.micron.com (10.160.29.139) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 9 Jul 2018 23:54:11 +0800 Received: from SIWEX5A.sing.micron.com ([fe80::a9c5:8ccb:fd84:268d]) by SIWEX5A.sing.micron.com ([fe80::a9c5:8ccb:fd84:268d%25]) with mapi id 15.00.1347.000; Mon, 9 Jul 2018 23:54:11 +0800 From: "Bean Huo (beanhuo)" To: Boris Brezillon , Chris Packham CC: "linux-kernel@vger.kernel.org" , "linux-mtd@lists.infradead.org" , "miquel.raynal@bootlin.com" , "computersforpeace@gmail.com" , "dwmw2@infradead.org" Subject: Re: [PATCH v6 0/6] mtd: rawnand: support MT29F1G08ABAFAWP-ITE:F Thread-Topic: [PATCH v6 0/6] mtd: rawnand: support MT29F1G08ABAFAWP-ITE:F Thread-Index: AdQXnRLnAy8+kBX/RY20g+cq7ZFQJQ== Date: Mon, 9 Jul 2018 15:54:11 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.160.29.124] X-TM-AS-Product-Ver: SMEX-12.0.0.1782-8.200.1013-23956.005 X-TM-AS-Result: No--7.417400-0.000000-31 X-TM-AS-MatchedID: 150567-139010-704096-703747-703788-700756-780012-711331-7 02016-705102-710970-703376-702807-701604-700624-700942-704980-702020-780011 -707451-707476-702067-702010-703267-702609-707663-704930-105250-708712-7023 58-700019-139702-700648-710556-148004-148050-148980-20043-42000-42003-29961 -63 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No x-mt-checkinternalsenderrule: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 137.201.82.98 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Boris and Chris >> >> 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. MT29F1G08ABAFAWP-ITE:F is Micron 70s SLC NAND with on-die ECC. If the bit7 in the byte 5 of READID default is 1(ECC Enabled), it is true on-die ECC Cannot be disabled by SET Feature command. In case sending Set Feature command, you can check previous command is success or not by Get Feature or check this bit7 in byte 5 of READID later. To check if this device supports on-die ECC or not, you can use inter ECC level (bit 0 and bit1 in byte 5 of READID) http://lists.infradead.org/pipermail/linux-mtd/2017-April/073370.html //beanhuo