
Hi Simon,
On Wed, Oct 26, 2022 at 1:35 AM Simon Glass sjg@chromium.org wrote:
Hi,
On Mon, 24 Oct 2022 at 03:35, Dario Binacchi dario.binacchi@amarulasolutions.com wrote:
From: Mikhail Kshevetskiy mikhail.kshevetskiy@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@iops... Suggested-by: Michael Trimarchi michael@amarulasolutions.com Co-developed-by: Michael Trimarchi michael@amarulasolutions.com Signed-off-by: Michael Trimarchi michael@amarulasolutions.com Co-developed-by: Dario Binacchi dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi dario.binacchi@amarulasolutions.com Tested-by: Mikhail Kshevetskiy mikhail.kshevetskiy@iopsys.eu Signed-off-by: Mikhail Kshevetskiy mikhail.kshevetskiy@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