Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1071295ybp; Fri, 4 Oct 2019 09:06:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuYx54lQXW0VRtcs4dVwh7t3WJDuRJt3rMliabL4EjSk+JPBxblzHzPuZRMZ4zj750rxRl X-Received: by 2002:a17:906:fc2:: with SMTP id c2mr13074851ejk.261.1570205169406; Fri, 04 Oct 2019 09:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570205169; cv=none; d=google.com; s=arc-20160816; b=fRys3X8IYb188nPjMEV4YGbEwuwrscg/urccmYfPXj14BPK97hRRClF+RAWBFOoS7H 82NGMVUVd0La2EgWhG89oMSjJl/wzsH5aRqJPGeCy9YF3jpzrn+goXurCpMhLnYqhkNA UlG2gSZJt04H1aKnfQNmQhCOiFWBbMv+CMptUSyiAC2NicydxkdjSNFZZy4rArqs4MyS hEIIoY1P5HsKz85GIUXIEqvEAYCHXR84HQKf9i4vVQGtq+fNfwEbrR9iEhxVxwWY+Iod eAEWeh3HG5thKDKgEQ/Ho2t6Tf19dzasLTfb/6L2RWz5HZ/C7+MIshbQMcu2ylN1g4AM ttxQ== 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:date:subject:cc:to:from; bh=pVXgUE6hrRRqlPqU27kjhrmb4z9gwFeAxfNCm64AX/0=; b=LgoLLef+2dm/t1Nwl6CXiIXsBhqiygdlniaiZ7F0LxriTIEkuVFatNi0jOs2wU5uXB JrKN7RRkz836dy9oYv7/AZsoZhK1uonDfRQJULnWFGV62/kdgLJYzrHIteMiSsb1AU3Q 58uJAUp1bBDT8QKafpcLzhTWMEcxK+Ew2AtTugM01jFYYXjJ39Mimrq5xIZvdmMK0WC/ 9ME1hCh+KKv13Ns7jr8iY/io/bO7v1ZXVF/iZRwxt0R3U+MScO71Uqjf+Xx7a+1xhttL xoZOfePgcQQUpQ1ixIGKrh0X0j8DRhZpGoWjnVL+02F4LC1p8NP7SvoiGfRYWvW/2FIQ 5csA== 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 si9si3305934ejb.97.2019.10.04.09.05.45; Fri, 04 Oct 2019 09:06:09 -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 S2390274AbfJDQEt (ORCPT + 99 others); Fri, 4 Oct 2019 12:04:49 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:40133 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390043AbfJDQEt (ORCPT ); Fri, 4 Oct 2019 12:04:49 -0400 X-Originating-IP: 93.23.105.117 Received: from xps13.stephanxp.local (117.105.23.93.rev.sfr.net [93.23.105.117]) (Authenticated sender: miquel.raynal@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 164A524000A; Fri, 4 Oct 2019 16:04:44 +0000 (UTC) From: Miquel Raynal To: Piotr Sroka Cc: Miquel Raynal , Kate Stewart , Vignesh Raghavendra , Boris Brezillon , Richard Weinberger , Greg Kroah-Hartman , stable@vger.kernel.org, linux-kernel@vger.kernel.org, Marek Vasut , linux-mtd@lists.infradead.org, Frieder Schrempf , Thomas Gleixner , Brian Norris , David Woodhouse Subject: Re: [v2] mtd: rawnand: Change calculating of position page containing BBM Date: Fri, 4 Oct 2019 18:04:43 +0200 Message-Id: <20191004160443.6258-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190924055439.4212-1-piotrs@cadence.com> References: MIME-Version: 1.0 X-linux-mtd-patch-notification: thanks X-linux-mtd-patch-commit: a3c4c2339f8948b0f578e938970303a7372e60c0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-09-24 at 05:54:31 UTC, Piotr Sroka wrote: > Change calculating of position page containing BBM > > If none of BBM flags are set then function nand_bbm_get_next_page > reports EINVAL. It causes that BBM is not read at all during scanning > factory bad blocks. The result is that the BBT table is build without > checking factory BBM at all. For Micron flash memories none of these > flags are set if page size is different than 2048 bytes. > > Address this regression by: > - adding NAND_BBM_FIRSTPAGE chip flag without any condition. It solves > issue only for Micron devices. > - changing the nand_bbm_get_next_page_function. It will return 0 > if no of BBM flag is set and page parameter is 0. After that modification > way of discovering factory bad blocks will work similar as in kernel > version 5.1. > > Cc: stable@vger.kernel.org > Fixes: f90da7818b14 (mtd: rawnand: Support bad block markers in first, second or last page) > Signed-off-by: Piotr Sroka > Reviewed-by: Frieder Schrempf Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Miquel