mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Enrico Jorns <>
Cc: "Enrico Jörns" <>
Subject: [PATCH] mtd: nand: provide helpful error message when trying disabled ecc mode
Date: Thu,  8 Jul 2021 13:26:29 +0200
Message-ID: <> (raw)

We know the reason to return -ENOSYS, thus let the user know.
This will give him a much better hint why his NAND is not working than
only getting the generic

| probe failed: Function not implemented

Signed-off-by: Enrico Jorns <>
 drivers/mtd/nand/nand_base.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index b37017372f..4c90ad9757 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -5646,6 +5646,7 @@ int nand_scan_tail(struct nand_chip *chip)
 			if (!ecc->write_oob)
 				ecc->write_oob = nand_write_oob_syndrome;
 		} else if (ecc->mode == NAND_ECC_HW_SYNDROME) {
+			WARN(1, "CONFIG_NAND_ECC_HW_SYNDROME not enabled\n");
 			ret = -ENOSYS;
 			goto err_nand_manuf_cleanup;

barebox mailing list

             reply	other threads:[~2021-07-08 11:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08 11:26 Enrico Jorns [this message]
2021-07-09 20:56 ` Sascha Hauer

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror barebox/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 barebox barebox/ \
	public-inbox-index barebox

Example config snippet for mirrors.

AGPL code for this site: git clone