[PATCH v2] cmd: mtd: check if a block has to be skipped or erased
Dario Binacchi
dario.binacchi at amarulasolutions.com
Sun Oct 30 15:10:53 CET 2022
Hi Simon,
On Wed, Oct 26, 2022 at 1:35 AM Simon Glass <sjg at chromium.org> wrote:
>
> Hi,
>
> On Mon, 24 Oct 2022 at 03:35, Dario Binacchi
> <dario.binacchi at amarulasolutions.com> wrote:
> >
> > From: Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu>
> >
> > As reported by patch [1], the `mtd erase' command should not erase bad
> > blocks.
> > To force bad block erasing you have to use the `mtd erase.dontskipbad'
> > command.
> >
> > This patch tries to fix the same issue without modifying code taken
> > from the linux kernel, in order to make further upgrades easier.
> >
> > [1] https://lore.kernel.org/all/20221006031501.110290-2-mikhail.kshevetskiy@iopsys.eu/
> > Suggested-by: Michael Trimarchi <michael at amarulasolutions.com>
> > Co-developed-by: Michael Trimarchi <michael at amarulasolutions.com>
> > Signed-off-by: Michael Trimarchi <michael at amarulasolutions.com>
> > Co-developed-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
> > Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
> > Tested-by: Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu>
> > Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu>
> >
> > ---
> >
> > Changes in v2:
> > - Change the commit author
> > - Do not continue to erase if scrub option is enabled and a bad block
> > was found but return from the function.
> > - Update the patch tags.
> >
> > cmd/mtd.c | 17 +++++++++++++++--
> > 1 file changed, 15 insertions(+), 2 deletions(-)
>
> Can we get some tests in test/dm/mtd.c?
We are thinking about it. Probably not soon, but we are thinking
about what and how to add them.
Thanks and regards,
Dario
>
> Regards,
> Simon
--
Dario Binacchi
Embedded Linux Developer
dario.binacchi at amarulasolutions.com
__________________________________
Amarula Solutions SRL
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
info at amarulasolutions.com
www.amarulasolutions.com
More information about the U-Boot
mailing list