linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Tudor Ambarus <Tudor.Ambarus@microchip.com>,
	<linux-mtd@lists.infradead.org>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Subject: [PATCH v3 0/7] Fix use of Hamming helpers
Date: Tue, 13 Apr 2021 18:18:33 +0200	[thread overview]
Message-ID: <20210413161840.345208-1-miquel.raynal@bootlin.com> (raw)

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/

             reply	other threads:[~2021-04-13 16:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 16:18 Miquel Raynal [this message]
2021-04-13 16:18 ` [PATCH v3 1/7] mtd: rawnand: cs553x: Fix external use of SW Hamming ECC helper Miquel Raynal
2021-05-10  9:09   ` Miquel Raynal
2021-04-13 16:18 ` [PATCH v3 2/7] mtd: rawnand: fsmc: " 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 21:13   ` Vladimir Zapolskiy
2021-05-10  9:09   ` Miquel Raynal
2021-04-13 16:18 ` [PATCH v3 4/7] mtd: rawnand: ndfc: " Miquel Raynal
2021-05-10  9:09   ` Miquel Raynal
2021-04-13 16:18 ` [PATCH v3 5/7] mtd: rawnand: sharpsl: " Miquel Raynal
2021-05-10  9:09   ` Miquel Raynal
2021-04-13 16:18 ` [PATCH v3 6/7] mtd: rawnand: tmio: " Miquel Raynal
2021-05-10  9:09   ` Miquel Raynal
2021-04-13 16:18 ` [PATCH v3 7/7] mtd: rawnand: txx9ndfmc: " Miquel Raynal
2021-05-10  9:09   ` Miquel Raynal

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=20210413161840.345208-1-miquel.raynal@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /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;
as well as URLs for NNTP newsgroup(s).