public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Guillaume Tucker <guillaume.tucker@collabora.com>,
	Sascha Hauer <kernel@pengutronix.de>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Stefan Riedmueller <s.riedmueller@phytec.de>
Subject: Re: imx27: No space left to write bad block table
Date: Mon, 19 Apr 2021 15:40:56 +0200	[thread overview]
Message-ID: <20210419154056.505e5471@xps13> (raw)
In-Reply-To: <CAOMZO5C921yS9mVkTpTjwxapjKhr_FgSddYcYXA62LBVPoK=9g@mail.gmail.com>

Hi Fabio,

Fabio Estevam <festevam@gmail.com> wrote on Mon, 19 Apr 2021 09:48:20
-0300:

> On Mon, Apr 19, 2021 at 9:41 AM Fabio Estevam <festevam@gmail.com> wrote:
> 
> > This commit landed in linux-next 20210329. I was able to find the
> > kernelci log for this version and NAND is correctly probed:
> > https://storage.kernelci.org/next/master/next-20210329/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html
> >
> > The first NAND error starts with 20210330:
> > https://storage.kernelci.org/next/master/next-20210330/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html  
> 
> linux-next 20210329 introduced the following logs that were not
> present previously:
> 
> Bad block table written to 0x000007fa0000, version 0x01
> Bad block table written to 0x000007f80000, version 0x01
> 
> Maybe this new 'two Bad block tables' will confuse the subsequent boots?

I am pretty sure now the commit I pointed earlier today is the root
cause (but I don't know why, yet). Somehow it skips the bad block table
which is more or less declared like a bad block from a 'low level'
point of view (so that the user cannot erase/overwrite it). Here,
the kernel does not find the valid BBT. It then creates a new couple of
BBT. But doing so at the next boot, the recently created BBT won't be
detected anymore... until there are no more free blocks reserved for
that and that's where the probe fails.

So yes, the NAND controller driver probes correctly with next-20210329
but in fact the real bad block table is not found and this is the root
cause.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2021-04-19 13:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17 15:59 imx27: No space left to write bad block table Fabio Estevam
2021-04-19  6:37 ` Miquel Raynal
2021-04-19 11:47   ` Fabio Estevam
2021-04-19 12:27     ` Miquel Raynal
2021-04-19 12:41       ` Fabio Estevam
2021-04-19 12:48         ` Fabio Estevam
2021-04-19 13:01           ` Fabio Estevam
2021-04-19 13:40           ` Miquel Raynal [this message]
2021-04-19 13:56             ` Fabio Estevam
2021-04-19 13:04       ` Stefan Riedmüller
2021-04-19 15:36         ` Miquel Raynal
2021-04-20  6:26           ` Stefan Riedmüller
2021-04-21 20:44             ` Guillaume Tucker
2021-04-21 23:29               ` Fabio Estevam
2021-04-22 13:16                 ` Guillaume Tucker
2021-04-22 13:28                   ` Fabio Estevam
2021-04-23 21:04                     ` Fabio Estevam
2021-04-26 15:53           ` Stefan Riedmüller
2021-05-04  8:34             ` Miquel Raynal
2021-05-10  8:38               ` Stefan Riedmüller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210419154056.505e5471@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=festevam@gmail.com \
    --cc=guillaume.tucker@collabora.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=s.riedmueller@phytec.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox