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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux