public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Make NAND_BBT_NO_OOB_BBM configurable or let the gpmi driver decide?
@ 2022-02-21 19:00 Daniel Glöckner
  2022-02-22 22:02 ` Han Xu
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Glöckner @ 2022-02-21 19:00 UTC (permalink / raw)
  To: linux-mtd; +Cc: Lothar Waßmann, Brian Norris, Han Xu

Hi,

we are using UBI on a NAND flash with BBT and have recently observed
bad blocks where nand_markbad_bbm returns an error. Since that error is
returned by nand_block_markbad_lowlevel even when marking the block in
the BBT succeeds, UBI goes into read-only mode. We would therefore like
to set NAND_BBT_NO_OOB_BBM.

Unfortunately there is no device tree property for this flag. Also we
internally disagree if this should be configurable on our platform at
all. We are using an i.MX6 that needs to relocate the bad block marker
to a different byte within the page because of its ECC layout.

In 2014 Lothar already submitted a patch to add a nand-no-oob-bbm device
tree property that got rejected:
https://patchwork.kernel.org/project/linux-arm-kernel/patch/1402579245-13377-5-git-send-email-LW@KARO-electronics.de/
Brian suggested back then to tie this behavior to the non-standard
fsl,no-blockmark-swap property because the marker becomes completely
useless when it stays at the same position as data bytes in good blocks.

So which solution would have the highest chance of being accepted as a
patch? Introducing a device tree property for NAND_BBT_NO_OOB_BBM, using
fsl,no-blockmark-swap, or setting NAND_BBT_NO_OOB_BBM for all boards
inside the i.MX gpmi driver when there is a BBT? Or maybe renaming
fsl,no-blockmark-swap to nand-no-oob-bbm (with a transition phase)?

Best regards,

  Daniel

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-03-15  8:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-21 19:00 Make NAND_BBT_NO_OOB_BBM configurable or let the gpmi driver decide? Daniel Glöckner
2022-02-22 22:02 ` Han Xu
2022-02-23 10:59   ` Daniel Glöckner
2022-02-24 15:29     ` Miquel Raynal
2022-02-24 15:55       ` Daniel Glöckner
2022-02-24 16:03         ` Miquel Raynal
2022-02-24 18:17           ` Daniel Glöckner
2022-03-14 15:45             ` Miquel Raynal
2022-03-15  7:06               ` Lothar Waßmann
2022-03-15  8:34                 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox