πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
2 messages
2 total messages Started by Marc Kleine-Budde Wed, 18 Nov 2026 09:11
[PATCH net-next 09/12] can: ifi_canfd: don't discard the IRQ lookup error in probe
#18414
Author: Marc Kleine-Budde
Date: Wed, 18 Nov 2026 09:11
47 lines
12272 bytes
From: Chaosheng Qu <chaosheng.qu.linux@gmail.com>

ifi_canfd_plat_probe() maps every failure of platform_get_irq() to
-EINVAL:

	irq = platform_get_irq(pdev, 0);
	if (irq < 0)
		return -EINVAL;

The driver matches through an of_match_table ("ifi,canfd-1.0"), so
of_irq_get() returns -EPROBE_DEFER while the interrupt controller has not
been probed. The probe overwrites it and the driver core stops retrying,
leaving the device unbound even though the interrupt controller appears
later.

Return the lookup error unchanged, as the neighbouring CAN platform drivers
do, e.g. previous commit ("can: cc770: don't discard the IRQ lookup error
in probe").

A device tree without an interrupt now reports -ENXIO rather than
-EINVAL; the driver core treats both as a failed probe.

Build tested on x86_64.

Signed-off-by: Chaosheng Qu <chaosheng.qu.linux@gmail.com>
Link: https://patch.msgid.link/165f3fccb8faf1db65e8f18dbee4694c95266e31.1792118040.git.chaosheng.qu.linux@gmail.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/ifi_canfd/ifi_canfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/ifi_canfd/ifi_canfd.c b/drivers/net/can/ifi_canfd/ifi_canfd.c
index 9eecfe5a87bd..e0f5abd934fa 100644
--- a/drivers/net/can/ifi_canfd/ifi_canfd.c
+++ b/drivers/net/can/ifi_canfd/ifi_canfd.c
@@ -965,7 +965,7 @@ static int ifi_canfd_plat_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return -EINVAL;
+		return irq;
 
 	id = readl(addr + IFI_CANFD_IP_ID);
 	if (id != IFI_CANFD_IP_ID_VALUE) {
-- 
2.53.0
Re: [PATCH net-next 09/12] can: ifi_canfd: don't discard the IRQ lookup error in probe
#19081
Author: netdev-bot+sashiko
Date: Thu, 19 Nov 2026 09:54
60 lines
10362 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message for "can: ifi_canfd: don't discard the IRQ
  lookup error in probe" presents a user-visible failure as fact ("The…

--

can: ifi_canfd: don't discard the IRQ lookup error in probe

This commit changes ifi_canfd_plat_probe() to return the error from
platform_get_irq() unchanged, instead of turning every failure into
-EINVAL. As a result, -EPROBE_DEFER now reaches the driver core.

Link: https://patch.msgid.link/165f3fccb8faf1db65e8f18dbee4694c95266e31.1792118040.git.chaosheng.qu.linux@gmail.com

> The driver matches through an of_match_table ("ifi,canfd-1.0"), so
> of_irq_get() returns -EPROBE_DEFER while the interrupt controller has not
> been probed. The probe overwrites it and the driver core stops retrying,
> leaving the device unbound even though the interrupt controller appears
> later.
>
> Return the lookup error unchanged, as the neighbouring CAN platform drivers
> do, e.g. previous commit ("can: cc770: don't discard the IRQ lookup error
> in probe").

[Severity: Low]
The code change looks correct, and the mechanism is real. of_irq_get()
returns -EPROBE_DEFER when irq_find_host() finds no domain, and the old
return -EINVAL made that a permanent probe failure.

Can any in-tree platform actually hit this failure? The "ifi,canfd-1.0"
compatible appears only in ifi_canfd_of_table. No binding document or DTS
uses it, and the only testing note is "Build tested on x86_64".

The message reads like a fix for a confirmed user-visible failure. It has
no Fixes: tag, though, and it doesn't say the problem is latent. With
neither, a stable backporter or AUTOSEL can't tell whether to take it or
how far back it should go.

The cc770 commit that this message uses as its model was edited to say
"This is a robustness and consistency cleanup, this issue has not been
seen on real hardware."

Could this message use the same framing? The other option would be a
Fixes: tag naming the commit that added the driver.

A smaller point: "previous commit" doesn't match the applied history. The
commit directly before this one is "can: janz-ican3: don't discard the IRQ
lookup error in probe", not the cc770 change.

The cc770 change is already applied. Would the usual commit <sha>
("title") form be clearer here?

-- 
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261118092955.1283165-2-mkl%40pengutronix.de
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads