mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: provide helpful error message when trying disabled ecc mode
@ 2021-07-08 11:26 Enrico Jorns
  2021-07-09 20:56 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Enrico Jorns @ 2021-07-08 11:26 UTC (permalink / raw)
  To: barebox; +Cc: Enrico Jörns

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 <ejo@pengutronix.de>
---
 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;
 		}
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

* Re: [PATCH] mtd: nand: provide helpful error message when trying disabled ecc mode
  2021-07-08 11:26 [PATCH] mtd: nand: provide helpful error message when trying disabled ecc mode Enrico Jorns
@ 2021-07-09 20:56 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-07-09 20:56 UTC (permalink / raw)
  To: Enrico Jorns; +Cc: barebox

On Thu, Jul 08, 2021 at 01:26:29PM +0200, Enrico Jorns wrote:
> 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 <ejo@pengutronix.de>
> ---
>  drivers/mtd/nand/nand_base.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

end of thread, other threads:[~2021-07-09 20:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 11:26 [PATCH] mtd: nand: provide helpful error message when trying disabled ecc mode Enrico Jorns
2021-07-09 20:56 ` Sascha Hauer

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.barebox.org/barebox/0 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/ https://lore.barebox.org/barebox \
		barebox@lists.infradead.org barebox@lists.infradead.org
	public-inbox-index barebox

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git