EDAC/aspeed: do not fail probe when ECC is disabled
Subsystems (3)
PATCH v2 1/1 EDAC/aspeed: do not fail probe when ECC is disabled
Running an AST2600 without DRAM ECC is a normal setup, but aspeed_probe() returns -EPERM in that case, so every such board logs "probe with driver aspeed-edac failed with error -1" at boot.
Return -ENODEV, which the driver core does not report as a probe failure, and lower the message to dev_info.
---
v2:
- Shorter changelog; the AI note moved below the --- line (Ryan Chen).
- v1: https://lore.kernel.org/all/[email protected]/
Tested: on QEMU ast2600-evb, mainline d06ce6f1eb5e prints "probe with driver aspeed-edac failed with error -1"; with this patch only the info line "ECC mode is not configured in u-boot" remains. Both kernels booted to the initramfs, which then stopped because no flash image was attached. Not tested on hardware.
This change was prepared with the help of an AI coding assistant (Claude); I reviewed it and stand behind it.
drivers/edac/aspeed_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/edac/aspeed_edac.c +2 -2
@@ -295,8 +295,8 @@ static int aspeed_probe(struct platform_device *pdev)/* bail out if ECC mode is not configured */ regmap_read (aspeed_regmap,ASPEED_MCR_CONF , ®04);if (!(reg04 &ASPEED_MCR_CONF_ECC )) { -dev_err (&pdev->dev,"ECC mode is not configured in u-boot\n" ); -return -EPERM ; +dev_info (&pdev->dev,"ECC mode is not configured in u-boot\n" ); +return -ENODEV ; } edac_op_state =EDAC_OPSTATE_INT ;
Signature · 1 line
2.53.0
Luck, Tony
maintainerQuoted 3 lines
Running an AST2600 without DRAM ECC is a normal setup, but
aspeed_probe()returns-EPERMin that case, so every such board logs "probe with driver aspeed-edac failed with error -1" at boot.
What's the use of an EDAC driver on a system that doesn't have ECC enabled?
Checking that ECC was enabled was an original goal of the "Bluesmoke" community project that spawned EDAC drivers.
-Tony