Skip to contentSkip to conversation

mtd: nand: provide helpful error message when trying disabled ecc mode

PATCH Applied Enrico Jorns 2 participants 2 messages Jul 8, 2021 – Jul 9, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: nand: provide helpful error message when trying disabled ecc mode

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

---
 drivers/mtd/nand/nand_base.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mtd/nand/nand_base.c +1 -0
index b37017372f..4c90ad9757 100644
@@ -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;
 		}
Signature · 7 lines
2.30.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 10 lines · Enrico Jorns

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

---
 drivers/mtd/nand/nand_base.c | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks

Sascha

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox