Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4615902yba; Wed, 10 Apr 2019 00:57:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXlAXWfZSP/z11/dknnkIOh86UBlhBxJ7WyHAd5lT4e1KfYRw/Tcc0B/pqu53+LxS2QZrj X-Received: by 2002:a17:902:201:: with SMTP id 1mr42433199plc.89.1554883040103; Wed, 10 Apr 2019 00:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554883040; cv=none; d=google.com; s=arc-20160816; b=qqHCxpbh+Xh7A50liSM2CSlKs04qLkzZfdSSFvvUNwVQMYtYrmTv8buLi9Zz6+syao xc8IjbMnCww30Y5dHdck0Xo+5MBPYeSXZUk9FzdcR7jvI0u4MZHMEZlJZ6+SCkgcym5v 3UJ5YtQl3xfhmZk77SoA0/N6zjdstrSr3Ugk2DC+62aS3H+UhE4eBgxLjiJtWVb7kM30 Jwo+5GveP6UONU9gqIVE8qAGLeoYPaWCVKeFJxYlCw/oD4e5SUgmMQ/8LvoTei0AfpEi v0ccqNabo1+qvvU9AWGPxfrHjZXTycq9uv1ZEOPRXejgji+NZD1rzyiEoMT1/ekuT5DP bSBw== 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=Vp1j+1uqecCQ32ol9ZBWL5GlQTCQdFs1jCwZ+cWEXOw=; b=TdPB36Z+89I9u1lSKFWoweYBXdGeq9b1cOnlE+6Qjb6uD+L2Ahbp1Css925IlfSbvp Qg7zVrYtNt78yNdLcVqhWVH0NRKop4aKCCr/gN30RVTqGNIfrw1p2tNXHyeGEJq0Z7SX rPZUxDR++hcG1KF8YKB++ft086zwtlOHSlbp/IDfyS+HaHkGe7Jp2CCguLLOCw84//+f dKYormoOLtkTZF6fXGLhKtG5zcYFbcABInpgjLIWQn1TAR5flybn4yMn8S/keIasKMZT p+EIBLJHDh3FaGcjYEp5eCb7FtfZd8GKImf3Re/40dDpThMhBXw2k2sOd8QxNI+EJfO5 ZM0A== 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 v4si30443916pgr.591.2019.04.10.00.57.03; Wed, 10 Apr 2019 00:57:20 -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 S1727905AbfDJHQT convert rfc822-to-8bit (ORCPT + 99 others); Wed, 10 Apr 2019 03:16:19 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:45527 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbfDJHQS (ORCPT ); Wed, 10 Apr 2019 03:16:18 -0400 X-Originating-IP: 90.88.18.121 Received: from xps13 (aaubervilliers-681-1-63-121.w90-88.abo.wanadoo.fr [90.88.18.121]) (Authenticated sender: miquel.raynal@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id B6D7EFF808; Wed, 10 Apr 2019 07:16:13 +0000 (UTC) Date: Wed, 10 Apr 2019 09:16:12 +0200 From: Miquel Raynal To: masonccyang@mxic.com.tw Cc: "Boris Brezillon" , 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, richard@nod.at, zhengxunli@mxic.com.tw Subject: Re: [PATCH] mtd: rawnand: Add Macronix NAND read retry and randomizer support Message-ID: <20190410091612.229c91b4@xps13> In-Reply-To: References: <1554780172-23111-1-git-send-email-masonccyang@mxic.com.tw> <20190409090427.22de9917@collabora.com> <20190409114701.744c2c8c@collabora.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mason, masonccyang@mxic.com.tw wrote on Wed, 10 Apr 2019 09:14:14 +0800: > 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. So if you write non-randomized data to the NAND chip, then enable the randomizer en read back the data, all will be ok? And if randomized data is written to the NAND chip and we disable the randomizer, then the data will also be correct? > > > > > 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. Is this info somewhere in the ONFI param page? I suppose once randomization is enabled we should also tweak the timings and verify that the controller supports it. > > > 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 ? > > thanks & best regards, > Mason > Thanks, Miquèl