From: Eric Yun Lin Chiang <ericyunlinchiang@gmail.com>
To: Stefan Schaeckeler <sschaeck@cisco.com>,
Borislav Petkov <bp@alien8.de>, Tony Luck <tony.luck@intel.com>
Cc: Joel Stanley <joel@jms.id.au>,
Andrew Jeffery <andrew@codeconstruct.com.au>,
Ryan Chen <ryan_chen@aspeedtech.com>,
Billy Tsai <billy_tsai@aspeedtech.com>,
linux-edac@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] EDAC/aspeed: do not fail probe when ECC is disabled
Date: Fri, 4 Dec 2026 08:56:37 +0800 [thread overview]
Message-ID: <20261204005637.2354401-1-ericyunlinchiang@gmail.com> (raw)
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.
Fixes: 9b7e6242ee4e ("EDAC, aspeed: Add an Aspeed AST2500 EDAC driver")
Signed-off-by: Eric Yun Lin Chiang <ericyunlinchiang@gmail.com>
---
v2:
- Shorter changelog; the AI note moved below the --- line (Ryan Chen).
- v1: https://lore.kernel.org/all/20261118151907.3949719-1-ericyunlinchiang@gmail.com/
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(-)
diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
index 6e069b255..e6f8cf78a 100644
--- a/drivers/edac/aspeed_edac.c
+++ b/drivers/edac/aspeed_edac.c
@@ -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;
--
2.53.0
reply other threads:[~2026-12-04 0:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204005637.2354401-1-ericyunlinchiang@gmail.com \
--to=ericyunlinchiang@gmail.com \
--cc=andrew@codeconstruct.com.au \
--cc=billy_tsai@aspeedtech.com \
--cc=bp@alien8.de \
--cc=joel@jms.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ryan_chen@aspeedtech.com \
--cc=sschaeck@cisco.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®