Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4602684yba; Wed, 10 Apr 2019 00:34:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwn33rZ1W4L1uxz7xygABvf8EUtbICLmvz1Oj1HAqVO4GLlKXfz5awM0uoNiyGFFBCcM4/M X-Received: by 2002:a62:1249:: with SMTP id a70mr41556732pfj.160.1554881642363; Wed, 10 Apr 2019 00:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554881642; cv=none; d=google.com; s=arc-20160816; b=SCZTdCMnBq9Gr1CRZPU9ZHEcqSd2CW5CXtbyBj8iH8fZfIeFJjG2CMaJ5AIbhNc+TT K9P+Tgl8vmu5BQ9sSwIWSLY5SA4+5Bd5pvclY6ZW27VLZivD7zMEYzY35fsmGSlRf0AD 2NidgkEcMbh8JV/ogXDEcZJGllq+oGZg6lqCFQfCepLYu2TtbnP9V7VodQqx7qjpoC9B a+1JSU7O/S1Wu0H3MTNMyokRBgSZiBvW5rUl49/d5DJm070QtueNdmwctybwjbJ94W2N qswCkDe28SjtqT2WnRtPpTymyEcCEwqjXmirwhmg/klQkP0Ii3NqlNv3p0aokh+aRhlf NrJA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=y7H+wOrrB5O/XpWt76i74vEmtQu5mTwYMeFhKx3ZMbA=; b=owolL/pVwq81SGu1n0Z7KkWsK6V/RkWC0UmpH4wmbCqGd8ipMpzKw/rCA5hf9TEHgU CHXvzaws3hnXu2MdNVP3iuhxd0ctxWjhiTwDeLeyBDQGu0iuUr/RjFEevxPKe/SzT7Kp pq26IUJuDrVfUpSJofxXBqH+1VRUq00dtLDXnsW1I9DH0dMVK50UAaEyRA+MhUeVbB+1 mQIeuDeGcAQcFJ+gCCOtNseV6ThR/Gh//m3IyawM3NzTYay+mj59VMqT3loOXyuar9En vkZRbN7CX7USSvwjSnl+TOkcP0XZXGto4WaT0EkVXsTcrc7+uTTJG9uAoOggDcNzEPy7 GOcw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i27si29236604pgl.305.2019.04.10.00.33.44; Wed, 10 Apr 2019 00:34:02 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728840AbfDJHXD (ORCPT + 99 others); Wed, 10 Apr 2019 03:23:03 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:52988 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726931AbfDJHXC (ORCPT ); Wed, 10 Apr 2019 03:23:02 -0400 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 3CA8B281461; Wed, 10 Apr 2019 08:23:01 +0100 (BST) Date: Wed, 10 Apr 2019 09:22:58 +0200 From: Boris Brezillon To: masonccyang@mxic.com.tw Cc: bbrezillon@kernel.org, computersforpeace@gmail.com, dwmw2@infradead.org, juliensu@mxic.com.tw, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, marek.vasut@gmail.com, miquel.raynal@bootlin.com, richard@nod.at, zhengxunli@mxic.com.tw Subject: Re: [PATCH] mtd: rawnand: Add Macronix NAND read retry and randomizer support Message-ID: <20190410092258.332ef399@collabora.com> In-Reply-To: References: <1554780172-23111-1-git-send-email-masonccyang@mxic.com.tw> <20190409090427.22de9917@collabora.com> <20190409114701.744c2c8c@collabora.com> Organization: Collabora X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-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 Wed, 10 Apr 2019 09:14:14 +0800 masonccyang@mxic.com.tw wrote: > Hi Boris, > > > > > Subject > > > > Re: [PATCH] mtd: rawnand: Add Macronix NAND read retry and randomizer > support > > > > On Tue, 9 Apr 2019 17:35:39 +0800 > > masonccyang@mxic.com.tw wrote: > > > > > > > + > > > > > +static const struct kobj_attribute sysfs_mxic_nand = > > > > > + __ATTR(nand_random, S_IRUGO | S_IWUSR, > > > > > + mxic_nand_rand_type_show, > > > > > + mxic_nand_rand_type_store); > > > > > > > > No, we don't want to expose that through a sysfs file, especially > since > > > > changing the randomizer config means making the NAND unreadable for > > > > those that have used it before the change. > > > > > > > > > > Our on-die randomizer is still readable from user after the function > > > is enabled. > > > > You mean the memory is still readable no matter the randomizer state. > > Not sure how that's possible, but okay. > > > > > This randomizer is just like a internal memory cell > > > reliability enhanced. > > > > Why don't you enable it by default then? > > The penalty of randomizer is read/write performance down. > i.e,. tPROG 300 us to 340 us (randomizer enable) > therefore, disable it by default. I'm a bit puzzled. On the NAND I've seen that required data randomization it's not something you'd want to disable as this implied poor data retention. What's the use case here? Are we talking about SLC or MLC NANDs? Should we enable this feature once we start seeing that the NAND starts being less reliable (basically when read-retry happens more often)? I really think this is something you should decide kernel side, because users have no clue when it's appropriate to switch this feature on/off. > > > > > > It could be enable at any time with OTP bit function and that's why > > > we patch it by sys-fs. > > > > Sorry, but that's not a good reason to expose that through sysfs. > > Any good way to expose randomizer function for user ? Don't expose it :P.