All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/7] Fix use of Hamming helpers
@ 2021-04-13 16:18 Miquel Raynal
  2021-04-13 16:18   ` Miquel Raynal
                   ` (6 more replies)
  0 siblings, 7 replies; 31+ messages in thread
From: Miquel Raynal @ 2021-04-13 16:18 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, linux-mtd
  Cc: Miquel Raynal

In one of my previous code reorganization I broke several
drivers. Recently spotted by Trevor on the lpc32xx_slc driver, I updated
several other drivers to benefit from this change.

Basically, I did a rename of the software Hamming ECC helpers, creating
this way a proper ECC engine and also rawnand helpers. The problem is,
using the raw NAND helpers from the various raw NAND drivers only works
now if the ECC engine has been properly initialized and the necessary
buffers allocated and pointers initialized. But in most cases of these
cases, the actual engine is a on host hardware ECC engine which lacks
correctness support. Using the bare helpers (which only do the
calculations) on provided buffers is enough. So switch to use these bare
helpers instead of the rawnand_* helpers which currently lead to a NULL
pointer dereference.

Changes since v2:
- Fix all drivers suffering from the same issue.
- Update the Fixes line to point to the real commit which introduce the
  problem.
- Added Trevor's Tested-by tag on the lpc32xx_slc fix.

Miquel Raynal (7):
  mtd: rawnand: cs553x: Fix external use of SW Hamming ECC helper
  mtd: rawnand: fsmc: Fix external use of SW Hamming ECC helper
  mtd: rawnand: lpc32xx_slc: Fix external use of SW Hamming ECC helper
  mtd: rawnand: ndfc: Fix external use of SW Hamming ECC helper
  mtd: rawnand: sharpsl: Fix external use of SW Hamming ECC helper
  mtd: rawnand: tmio: Fix external use of SW Hamming ECC helper
  mtd: rawnand: txx9ndfmc: Fix external use of SW Hamming ECC helper

 drivers/mtd/nand/raw/cs553x_nand.c | 11 ++++++++++-
 drivers/mtd/nand/raw/fsmc_nand.c   | 12 +++++++++++-
 drivers/mtd/nand/raw/lpc32xx_slc.c | 15 ++++++++++++++-
 drivers/mtd/nand/raw/ndfc.c        | 12 +++++++++++-
 drivers/mtd/nand/raw/sharpsl.c     | 12 +++++++++++-
 drivers/mtd/nand/raw/tmio_nand.c   |  8 +++++---
 drivers/mtd/nand/raw/txx9ndfmc.c   |  5 +++--
 7 files changed, 65 insertions(+), 10 deletions(-)

-- 
2.27.0


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

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

end of thread, other threads:[~2021-05-10  9:14 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 16:18 [PATCH v3 0/7] Fix use of Hamming helpers Miquel Raynal
2021-04-13 16:18 ` [PATCH v3 1/7] mtd: rawnand: cs553x: Fix external use of SW Hamming ECC helper Miquel Raynal
2021-04-13 16:18   ` Miquel Raynal
2021-05-10  9:09   ` Miquel Raynal
2021-05-10  9:09     ` Miquel Raynal
2021-04-13 16:18 ` [PATCH v3 2/7] mtd: rawnand: fsmc: " Miquel Raynal
2021-04-13 16:18   ` Miquel Raynal
2021-05-10  9:09   ` Miquel Raynal
2021-05-10  9:09     ` Miquel Raynal
2021-04-13 16:18 ` [PATCH v3 3/7] mtd: rawnand: lpc32xx_slc: " Miquel Raynal
2021-04-13 16:18   ` Miquel Raynal
2021-04-13 21:13   ` Vladimir Zapolskiy
2021-04-13 21:13     ` Vladimir Zapolskiy
2021-05-10  9:09   ` Miquel Raynal
2021-05-10  9:09     ` Miquel Raynal
2021-04-13 16:18 ` [PATCH v3 4/7] mtd: rawnand: ndfc: " Miquel Raynal
2021-04-13 16:18   ` Miquel Raynal
2021-05-10  9:09   ` Miquel Raynal
2021-05-10  9:09     ` Miquel Raynal
2021-04-13 16:18 ` [PATCH v3 5/7] mtd: rawnand: sharpsl: " Miquel Raynal
2021-04-13 16:18   ` Miquel Raynal
2021-05-10  9:09   ` Miquel Raynal
2021-05-10  9:09     ` Miquel Raynal
2021-04-13 16:18 ` [PATCH v3 6/7] mtd: rawnand: tmio: " Miquel Raynal
2021-04-13 16:18   ` Miquel Raynal
2021-05-10  9:09   ` Miquel Raynal
2021-05-10  9:09     ` Miquel Raynal
2021-04-13 16:18 ` [PATCH v3 7/7] mtd: rawnand: txx9ndfmc: " Miquel Raynal
2021-04-13 16:18   ` Miquel Raynal
2021-05-10  9:09   ` Miquel Raynal
2021-05-10  9:09     ` Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.