Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp579194pxf; Thu, 8 Apr 2021 08:52:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzh01mOTKW4PGzQluSjk1eYtPAAkt0ax5/SU5kq39Wfy7/dR+IGH5jwwDBD5NmoiGpJaDht X-Received: by 2002:a17:90a:fd0a:: with SMTP id cv10mr8767700pjb.167.1617897135355; Thu, 08 Apr 2021 08:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617897135; cv=none; d=google.com; s=arc-20160816; b=tRK9kXXKajLVJcEUnUJxFWiNhCrc87YDgJLoRAK5N1OsuiHBJlZHM7qJWTqXoY8uof EjxWQe/+jUsKNCaGZ31hv1jbnLBfv7Nw29w6h4iiqda+j/nfA6Q0MqPggSUbN5LYIs9e lpZmjsTt418fv2mOkJ+QBC5dLz3R4zw50euAjqRPvMPCjB7SKSlAnt69U9189lgMTPIX sJuFICo12o7rxdIFJuZwjYtnLAm21poL9AZzz9DY3yBIhjo8HoIRP5J2oE+xl/Deqs51 8pc4Gj4wA2k1Mjw7gwCG4HHOh1mDzDLINQJtgHDbuGnmYG+5fNSk5mKN6sfvFNyuxKRd TyIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=39xGwUvk6g72P7LFwzSkPwwBNY2jv84FL19sPuZwauM=; b=uY1d3pSoUF5sBgAW9mOpGKHHLOhd64BQ94+GXwUEilumMjVfgBg3bUenRayTpLclVC MWailqJoP608d8tM3/iXZRUewMLknZgC2SW6sqCpt6fOD4fghmmtEDtHLg1q89we9AKq FdvCmYaSzbeBlBa4LQCs0PbXDas/KaCAHFE8aZh6Su3wcD9gi4OQr5ZGzQ5G+kuEqjFN BLci7ciftp5uqDDWxqCpcROAR0XpdvutIL7XKQN7YvkwpS9jScUmU5WbDLrG1GtZdQxT xRDUVVqrpXpalGEu7i+mLMX2meU+bUUHIS8SEQ3RNIIzZ9nwgea2z3VgFllvcp7VgFNj lojw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si6720806plh.161.2021.04.08.08.52.02; Thu, 08 Apr 2021 08:52:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231791AbhDHPtn convert rfc822-to-8bit (ORCPT + 99 others); Thu, 8 Apr 2021 11:49:43 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:45151 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231659AbhDHPtk (ORCPT ); Thu, 8 Apr 2021 11:49:40 -0400 X-Originating-IP: 90.89.138.59 Received: from xps13 (lfbn-tou-1-1325-59.w90-89.abo.wanadoo.fr [90.89.138.59]) (Authenticated sender: miquel.raynal@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id B281DC0016; Thu, 8 Apr 2021 15:49:24 +0000 (UTC) Date: Thu, 8 Apr 2021 17:49:22 +0200 From: Miquel Raynal To: Daniel Palmer Cc: linux-mtd@lists.infradead.org, Linux Kernel Mailing List Subject: Re: [PATCH v2] mtd: spinand: add support for Foresee FS35ND01G-S1Y2 Message-ID: <20210408174922.55c1149f@xps13> In-Reply-To: References: <20210213095724.3411058-1-daniel@0x0f.com> <20210215112409.1a755bf0@xps13> <20210215121653.4edd86c4@xps13> <20210322193213.18520b9a@xps13> <20210323113233.3523d66b@xps13> <20210323150603.6b942a60@xps13> <20210407100204.08d894ca@xps13> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, Daniel Palmer wrote on Wed, 7 Apr 2021 21:01:01 +0900: > Hi Miquel, > > On Wed, 7 Apr 2021 at 17:02, Miquel Raynal wrote: > > You may look at micron_8_ecc_get_status() helper to guide you. But > > IMHO, if there are 0-3 bf, you should probably assume there were 3 bf > > and return 3, if there were 4, return 4, if it's uncorrectable return > > -EBADMSG otherwise -EINVAL. > > Understood. > > > We should verify that this does not mess with UBI wear leveling > > though. Please check that returning 3-bit errors no matter the > > actual number of flipped bits does not lead UBI to move the data away > > (I think it's fine but we need to be sure otherwise the implementation > > proposal is not valid). > > Ok. I'm not sure how to check that yet but I'll look into it. > You can probably check the threshold in sysfs (/sys/class/mtd/mtdX/*threshold*). Thanks, Miquèl