pull-request: can-next 2026-11-19
Subsystems (11)
Marc Kleine-Budde
maintainercover pull-request: can-next 2026-11-19
Hello netdev-team,
this is a pull request of 13 patches for net-next/main.
Stéphane Grosjean's patch adds him as a maintainer for the PEAK-System CAN drivers.
A patch by Sang-Heon Jeon removes a redundant NULL check before netdev_hold() in the CAN RAW protocol.
Magnus Aagaard Sørensen contributes a patch to remove the unused function safe_candev_priv().
Triet Hoang converts several CAN drivers to DEFINE_SIMPLE_DEV_PM_OPS().
Wentao Liang's patch fixes a clock leak in the suni4_can driver. (fix clock leak, found by LLM)
5 patches by Chaosheng Qu clean up the error handling for platform_get_irq() in several CAN drivers.
(fix error handling, found by LLM, but not been seen in real world
systems)
Oliver Hartkopp's patch removes the obsolete Softing CANcard driver.
A patch by Hemanth Selam removes a repeated word in a comment in the ucan driver.
The last patch is by Maximilian Zimmermann and sets CAN FD related flags on received frames in the xilinx_can driver.
(fix a real problem, can be seen in production system)
regards,
Marc
---
The following changes since commit 24630ff92eff08500ec4772728d4b1fa08c28f47:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (2026-11-19 10:02:10 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git tags/linux-can-next-for-7.5-20261119
for you to fetch changes up to 1d527d7ecfaf5cdf6cc75f94d3d8e23c0d17b537:
can: xilinx_can: set CAN FD flags on received frames (2026-11-19 22:52:36 +0100)
----------------------------------------------------------------
linux-can-next-for-7.5-20261119
----------------------------------------------------------------
Chaosheng Qu (5):
can: cc770: don't discard the IRQ lookup error in probe
can: sun4i_can: don't discard the IRQ lookup error in probe
can: at91_can: don't discard the IRQ lookup error in probe
can: janz-ican3: don't discard the IRQ lookup error in probe
can: ifi_canfd: don't discard the IRQ lookup error in probe
Hemanth Selam (1):
can: ucan: fix repeated word 'is' in comment
Magnus Aagaard Sørensen (1):
can: dev: remove unused safe_candev_priv()
Marc Kleine-Budde (1):
Merge patch series "can: don't discard the platform_get_irq() error in probe"
Maximilian Zimmermann (1):
can: xilinx_can: set CAN FD flags on received frames
Oliver Hartkopp (1):
can: remove Softing CANcard driver
Sang-Heon Jeon (1):
can: raw: remove redundant NULL check before netdev_hold()
Stéphane Grosjean (1):
MAINTAINERS: add entry for PEAK-System CAN drivers
Triet Hoang (1):
can: convert to DEFINE_SIMPLE_DEV_PM_OPS()
Wentao Liang (1):
can: sun4i_can: sun4ican_probe(): fix clk leak on unbound
MAINTAINERS | 12 + drivers/net/can/Kconfig | 1 - drivers/net/can/Makefile | 1 - drivers/net/can/at91_can.c | 9 +- drivers/net/can/bxcan.c | 8 +- drivers/net/can/cc770/cc770_platform.c | 7 +- drivers/net/can/dev/dev.c | 12 - drivers/net/can/ifi_canfd/ifi_canfd.c | 2 +- drivers/net/can/janz-ican3.c | 2 +- drivers/net/can/m_can/m_can_pci.c | 8 +- drivers/net/can/softing/Kconfig | 31 -- drivers/net/can/softing/Makefile | 5 - drivers/net/can/softing/softing.h | 168 ------ drivers/net/can/softing/softing_cs.c | 335 ----------- drivers/net/can/softing/softing_fw.c | 700 ----------------------- drivers/net/can/softing/softing_main.c | 864 ----------------------------- drivers/net/can/softing/softing_platform.h | 41 -- drivers/net/can/spi/hi311x.c | 8 +- drivers/net/can/spi/mcp251x.c | 8 +- drivers/net/can/sun4i_can.c | 9 +- drivers/net/can/usb/ucan.c | 2 +- drivers/net/can/xilinx_can.c | 6 + include/linux/can/dev.h | 3 - net/can/raw.c | 3 +- 24 files changed, 54 insertions(+), 2191 deletions(-) delete mode 100644 drivers/net/can/softing/Kconfig delete mode 100644 drivers/net/can/softing/Makefile delete mode 100644 drivers/net/can/softing/softing.h delete mode 100644 drivers/net/can/softing/softing_cs.c delete mode 100644 drivers/net/can/softing/softing_fw.c delete mode 100644 drivers/net/can/softing/softing_main.c delete mode 100644 drivers/net/can/softing/softing_platform.h
Marc Kleine-Budde
maintainerPATCH 1/13 MAINTAINERS: add entry for PEAK-System CAN drivers
From: Stéphane Grosjean <[email protected]>
The PEAK-System CAN drivers (peak_canfd, peak_pci, peak_pcmcia and peak_usb) are only covered by the generic CAN NETWORK DRIVERS entry, so get_maintainer.pl doesn't Cc their author on patches and bug reports touching them.
Add a dedicated entry. I wrote these drivers and maintain them as part of my work at PEAK-System, where I have the hardware and the firmware documentation needed to review and test changes. Patches keep going through the CAN tree, the entry only makes sure they reach me.
Also list the PEAK-System Linux support address as a reviewer, so that reports keep reaching the company if my own address ever goes stale.
This patch has been created with LLM assistance.
--- MAINTAINERS | 12 ++++++++++++ 1 file changed, 12 insertions(+)
MAINTAINERS +12 -0
@@ -21942,6 +21942,18 @@ PDS DSC VIRTIO DATA PATH ACCELERATOR R: Brett Creeley <[email protected]> F: drivers/vdpa/pds/ +PEAK-SYSTEM CAN DRIVERS +M: Stéphane Grosjean <[email protected]> +R: PEAK-System Linux support <[email protected]> +L: [email protected] +S: Supported +F: Documentation/ABI/testing/sysfs-class-net-peak_usb +F: drivers/net/can/peak_canfd/ +F: drivers/net/can/sja1000/peak_pci.c +F: drivers/net/can/sja1000/peak_pcmcia.c +F: drivers/net/can/usb/peak_usb/ +F: include/linux/can/dev/peak_canfd.h + PECI HARDWARE MONITORING DRIVERS M: Iwona Winiarska <[email protected]> L: [email protected]
base-commit: 24630ff92eff08500ec4772728d4b1fa08c28f47
Signature · 1 line
2.53.0
[email protected]
AI reviewRe: [PATCH net-next 01/13] MAINTAINERS: add entry for PEAK-System CAN drivers
This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information:
Hi!
This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information:
- Whether the issue was actually triggered, or is only theoretical (e.g. found by LLM and not proven at runtime). If it was triggered please include the symptoms, like the stack trace or kernel messages.
Please do not repost the series just to address the above. Instead, reply to this email with the missing information, so that reviewers can take it into account.
*IMPORTANT*: If you do repost (for other reasons) - please include the relevant info in the cover letter or commit messages.
Signature · 2 lines
The evaluation is done by an LLM so it may be wrong, if you think that is the case please reply and explain.
Marc Kleine-Budde
maintainerRe: [PATCH net-next 01/13] MAINTAINERS: add entry for PEAK-System CAN drivers
Quoted 9 lines · On 19.11.2026 22:18:55, [email protected] wrote:
Hi!
This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information:
- Whether the issue was actually triggered, or is only theoretical (e.g. found by LLM and not proven at runtime). If it was triggered please include the symptoms, like the stack trace or kernel messages.
Quoted 6 lines
Please do not repost the series just to address the above. Instead, reply to this email with the missing information, so that reviewers can take it into account.
*IMPORTANT*: If you do repost (for other reasons) - please include the relevant info in the cover letter or commit messages.
The cover letter explicitly lists this information for fixes:
| Wentao Liang's patch fixes a clock leak in the suni4_can driver. | (fix clock leak, found by LLM) | | 5 patches by Chaosheng Qu clean up the error handling for | platform_get_irq() in several CAN drivers. | (fix error handling, found by LLM, but not been seen in real world | systems) | | [...] | | The last patch is by Maximilian Zimmermann and sets CAN FD related | flags on received frames in the xilinx_can driver. | (fix a real problem, can be seen in production system)
All other patches are not fixes (code improvements, cleanups, remove of unused code or drivers).
regards,
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung Nürnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Re: [PATCH net-next 01/13] MAINTAINERS: add entry for PEAK-System CAN drivers
In reply to Marc Kleine-BuddeThis series was applied to netdev/net-next.git (main) by Marc Kleine-Budde <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Marc Kleine-Budde <[email protected]>:
Quoted 8 lines · On Thu, 19 Nov 2026 22:58:37 +0100 you wrote:
From: Stéphane Grosjean <[email protected]>
The PEAK-System CAN drivers (
peak_canfd,peak_pci,peak_pcmciaandpeak_usb) are only covered by the generic CAN NETWORK DRIVERS entry, so get_maintainer.pl doesn't Cc their author on patches and bug reports touching them.[...]
Here is the summary with links:
- [net-next,01/13] MAINTAINERS: add entry for PEAK-System CAN drivers
https://git.kernel.org/netdev/net-next/c/aeb9eb4b48ab - [net-next,02/13] can: raw: remove redundant NULL check before netdev_hold() https://git.kernel.org/netdev/net-next/c/850bccc21cfa - [net-next,03/13] can: dev: remove unused safe_candev_priv() https://git.kernel.org/netdev/net-next/c/b1a7bfc01b14 - [net-next,04/13] can: convert to DEFINE_SIMPLE_DEV_PM_OPS() https://git.kernel.org/netdev/net-next/c/ac7e2763cd16 - [net-next,05/13] can: sun4i_can: sun4ican_probe(): fix clk leak on unbound https://git.kernel.org/netdev/net-next/c/ec957a8257e1 - [net-next,06/13] can: cc770: don't discard the IRQ lookup error in probe https://git.kernel.org/netdev/net-next/c/1c7234484e46 - [net-next,07/13] can: sun4i_can: don't discard the IRQ lookup error in probe https://git.kernel.org/netdev/net-next/c/cedeef322d52 - [net-next,08/13] can: at91_can: don't discard the IRQ lookup error in probe https://git.kernel.org/netdev/net-next/c/e54162551905 - [net-next,09/13] can: janz-ican3: don't discard the IRQ lookup error in probe https://git.kernel.org/netdev/net-next/c/01c28a68d956 - [net-next,10/13] can: ifi_canfd: don't discard the IRQ lookup error in probe https://git.kernel.org/netdev/net-next/c/82a860d46902 - [net-next,11/13] can: remove Softing CANcard driver https://git.kernel.org/netdev/net-next/c/85cc67092bd4 - [net-next,12/13] can: ucan: fix repeated word 'is' in comment https://git.kernel.org/netdev/net-next/c/b12de036b5d8 - [net-next,13/13] can: xilinx_can: set CAN FD flags on received frames https://git.kernel.org/netdev/net-next/c/1d527d7ecfaf
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Marc Kleine-Budde
maintainerPATCH 2/13 can: raw: remove redundant NULL check before netdev_hold()
In reply to Marc Kleine-BuddeFrom: Sang-Heon Jeon <[email protected]>
netdev_hold() does nothing if dev is NULL, so the check before the call is redundant.
So remove it. No functional change.
This is the result of running the Coccinelle script from scripts/coccinelle/free/ifnulldev_put.cocci after commit f83b8a58695c ("coccinelle: ifnulldev_put: update outdated helper names").
--- net/can/raw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/can/raw.c +1 -2
@@ -558,8 +558,7 @@ static int raw_bind(struct socket *sock, struct sockaddr_unsized *uaddr, int len ro->bound =1 ;/* bind() ok -> hold a reference for new ro->dev */ WRITE_ONCE (ro->dev, dev); -if (ro->dev) -netdev_hold (ro->dev, &ro->dev_tracker,GFP_KERNEL ); +netdev_hold (ro->dev, &ro->dev_tracker,GFP_KERNEL );if (dev) {/* Either raw_notify() sees ro->dev on NETDEV_DOWN or
Signature · 1 line
2.53.0
Marc Kleine-Budde
maintainerPATCH 3/13 can: dev: remove unused safe_candev_priv()
In reply to Marc Kleine-BuddeFrom: Magnus Aagaard Sørensen <[email protected]>
After commit 4650ff58a1b9 ("Revert "can: raw: instantly reject unsupported CAN frames""), there are no other in-tree users of safe_candev_priv().
Remove function and prototype.
--- drivers/net/can/dev/dev.c | 12 ------------ include/linux/can/dev.h | 3 --- 2 files changed, 15 deletions(-)
drivers/net/can/dev/dev.c +0 -12
@@ -656,18 +656,6 @@ void unregister_candev(struct net_device *dev) }EXPORT_SYMBOL_GPL (unregister_candev); -/* Test if a network device is a candev based device -* and return the can_priv* if so. -*/ -struct can_priv *safe_candev_priv (struct net_device *dev) -{ -if (dev->type !=ARPHRD_CAN || dev->rtnl_link_ops != &can_link_ops) -return NULL ; - -return netdev_priv (dev); -} -EXPORT_SYMBOL_GPL (safe_candev_priv); -static __init int can_dev_init (void ) {int err;
include/linux/can/dev.h +0 -3
@@ -110,9 +110,6 @@ struct net_device *alloc_candev_mqs(int sizeof_priv, unsigned int echo_skb_max, alloc_candev_mqs(sizeof_priv, echo_skb_max, count, count)void free_candev (struct net_device *dev); -/* a candev safe wrapper around netdev_priv */ -struct can_priv *safe_candev_priv (struct net_device *dev); -int open_candev (struct net_device *dev);void close_candev (struct net_device *dev);void can_set_default_mtu (struct net_device *dev);
Signature · 1 line
2.53.0
Marc Kleine-Budde
maintainerPATCH 4/13 can: convert to DEFINE_SIMPLE_DEV_PM_OPS()
In reply to Marc Kleine-BuddeFrom: Triet Hoang <[email protected]>
Convert the deprecated SIMPLE_DEV_PM_OPS to DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr().
This lets us drop the __maybe_unused annotations from the suspend and resume callbacks, also reduces kernel size in case CONFIG_PM or CONFIG_PM_SLEEP is disabled.
--- drivers/net/can/bxcan.c | 8 ++++---- drivers/net/can/m_can/m_can_pci.c | 8 ++++---- drivers/net/can/spi/hi311x.c | 8 ++++---- drivers/net/can/spi/mcp251x.c | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-)
drivers/net/can/bxcan.c +4 -4
@@ -1042,7 +1042,7 @@ static void bxcan_remove(struct platform_device *pdev)free_candev (ndev); } -static int __maybe_unused bxcan_suspend (struct device *dev) +static int bxcan_suspend (struct device *dev) {struct net_device *ndev =dev_get_drvdata (dev);struct bxcan_priv *priv =netdev_priv (ndev);
@@ -1059,7 +1059,7 @@ static int __maybe_unused bxcan_suspend(struct device *dev)return 0 ; } -static int __maybe_unused bxcan_resume (struct device *dev) +static int bxcan_resume (struct device *dev) {struct net_device *ndev =dev_get_drvdata (dev);struct bxcan_priv *priv =netdev_priv (ndev);
@@ -1076,7 +1076,7 @@ static int __maybe_unused bxcan_resume(struct device *dev)return 0 ; } -static SIMPLE_DEV_PM_OPS(bxcan_pm_ops, bxcan_suspend, bxcan_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(bxcan_pm_ops, bxcan_suspend, bxcan_resume);static const struct of_device_id bxcan_of_match[] = { {.compatible ="st,stm32f4-bxcan" },
@@ -1087,7 +1087,7 @@ MODULE_DEVICE_TABLE(of, bxcan_of_match);static struct platform_driver bxcan_driver = { .driver = { .name =KBUILD_MODNAME , - .pm = &bxcan_pm_ops, + .pm =pm_sleep_ptr (&bxcan_pm_ops), .of_match_table = bxcan_of_match, }, .probe = bxcan_probe,
drivers/net/can/m_can/m_can_pci.c +4 -4
@@ -169,17 +169,17 @@ static void m_can_pci_remove(struct pci_dev *pci)pci_free_irq_vectors (pci); } -static __maybe_unused int m_can_pci_suspend (struct device *dev) +static int m_can_pci_suspend (struct device *dev) {return m_can_class_suspend (dev); } -static __maybe_unused int m_can_pci_resume (struct device *dev) +static int m_can_pci_resume (struct device *dev) {return m_can_class_resume (dev); } -static SIMPLE_DEV_PM_OPS(m_can_pci_pm_ops, +static DEFINE_SIMPLE_DEV_PM_OPS(m_can_pci_pm_ops, m_can_pci_suspend, m_can_pci_resume);static const struct pci_device_id m_can_pci_id_table[] = {
@@ -195,7 +195,7 @@ static struct pci_driver m_can_pci_driver = { .remove = m_can_pci_remove, .id_table = m_can_pci_id_table, .driver = { - .pm = &m_can_pci_pm_ops, + .pm = pm_sleep_ptr(&m_can_pci_pm_ops), }, };
drivers/net/can/spi/hi311x.c +4 -4
@@ -972,7 +972,7 @@ static void hi3110_can_remove(struct spi_device *spi)free_candev (net); } -static int __maybe_unused hi3110_can_suspend (struct device *dev) +static int hi3110_can_suspend (struct device *dev) {struct spi_device *spi =to_spi_device (dev);struct hi3110_priv *priv =spi_get_drvdata (spi);
@@ -1002,7 +1002,7 @@ static int __maybe_unused hi3110_can_suspend(struct device *dev)return 0 ; } -static int __maybe_unused hi3110_can_resume (struct device *dev) +static int hi3110_can_resume (struct device *dev) {struct spi_device *spi =to_spi_device (dev);struct hi3110_priv *priv =spi_get_drvdata (spi);
@@ -1022,13 +1022,13 @@ static int __maybe_unused hi3110_can_resume(struct device *dev)return 0 ; } -static SIMPLE_DEV_PM_OPS(hi3110_can_pm_ops, hi3110_can_suspend, hi3110_can_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(hi3110_can_pm_ops, hi3110_can_suspend, hi3110_can_resume);static struct spi_driver hi3110_can_driver = { .driver = { .name =DEVICE_NAME , .of_match_table = hi3110_of_match, - .pm = &hi3110_can_pm_ops, + .pm =pm_sleep_ptr (&hi3110_can_pm_ops), }, .id_table = hi3110_id_table, .probe = hi3110_can_probe,
drivers/net/can/spi/mcp251x.c +4 -4
@@ -1490,7 +1490,7 @@ static void mcp251x_can_remove(struct spi_device *spi)free_candev (net); } -static int __maybe_unused mcp251x_can_suspend (struct device *dev) +static int mcp251x_can_suspend (struct device *dev) {struct spi_device *spi =to_spi_device (dev);struct mcp251x_priv *priv =spi_get_drvdata (spi);
@@ -1517,7 +1517,7 @@ static int __maybe_unused mcp251x_can_suspend(struct device *dev)return 0 ; } -static int __maybe_unused mcp251x_can_resume (struct device *dev) +static int mcp251x_can_resume (struct device *dev) {struct spi_device *spi =to_spi_device (dev);struct mcp251x_priv *priv =spi_get_drvdata (spi);
@@ -1551,14 +1551,14 @@ static int __maybe_unused mcp251x_can_resume(struct device *dev)return 0 ; } -static SIMPLE_DEV_PM_OPS(mcp251x_can_pm_ops, mcp251x_can_suspend, +static DEFINE_SIMPLE_DEV_PM_OPS(mcp251x_can_pm_ops, mcp251x_can_suspend, mcp251x_can_resume);static struct spi_driver mcp251x_can_driver = { .driver = { .name =DEVICE_NAME , .of_match_table = mcp251x_of_match, - .pm = &mcp251x_can_pm_ops, + .pm =pm_sleep_ptr (&mcp251x_can_pm_ops), }, .id_table = mcp251x_id_table, .probe = mcp251x_can_probe,
Signature · 1 line
2.53.0
Marc Kleine-Budde
maintainerPATCH 5/13 can: sun4i_can: sun4ican_probe(): fix clk leak on unbound
In reply to Marc Kleine-BuddeFrom: Wentao Liang <[email protected]>
sun4ican_probe() obtains the CAN clock with of_clk_get(), but neither the probe error paths nor sun4ican_remove() ever call clk_put(), so the clock reference is leaked both when probing fails and when the driver is unbound.
Use devm_clk_get() so that the reference is released with the device. While there add support for EPROBE_DEFER to the error handling.
This patch has been generated with LLM assistance.
--- drivers/net/can/sun4i_can.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/can/sun4i_can.c +3 -4
@@ -819,7 +819,6 @@ static void sun4ican_remove(struct platform_device *pdev)static int sun4ican_probe (struct platform_device *pdev) { -struct device_node *np = pdev->dev.of_node;struct clk *clk;struct reset_control *reset =NULL ;void __iomem *addr;
@@ -844,10 +843,10 @@ static int sun4ican_probe(struct platform_device *pdev) } } - clk =of_clk_get (np,0 ); + clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (clk)) { -dev_err (&pdev->dev,"unable to request clock\n" ); - err = -ENODEV ; + err =PTR_ERR (clk); +dev_err_probe (&pdev->dev, err,"unable to request clock\n" ); goto exit; }
Signature · 1 line
2.53.0
Marc Kleine-Budde
maintainerPATCH 6/13 can: cc770: don't discard the IRQ lookup error in probe
In reply to Marc Kleine-BuddeFrom: Chaosheng Qu <[email protected]>
This is a robustness and consistency cleanup, this issue has not been seen on real hardware.
cc770_platform_probe() collapses every failure of platform_get_irq() into -ENODEV:
irq = platform_get_irq(pdev, 0); if (!mem || irq <= 0) return -ENODEV;
That discards -EPROBE_DEFER, so a probe that has to wait for its interrupt controller is never retried and the device stays unbound.
Return the lookup error unchanged, which is what the neighbouring CAN platform drivers already do (c_can_platform.c, flexcan-core.c, sja1000_platform.c). A device tree without an interrupt now reports -ENXIO rather than -ENODEV; the driver core treats those two the same way, so the outcome does not change.
The memory resource is checked first and on its own, so a missing region no longer triggers an IRQ lookup that cannot succeed.
This patch was created with LLM assistance.
--- drivers/net/can/cc770/cc770_platform.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/can/cc770/cc770_platform.c +5 -2
@@ -156,10 +156,13 @@ static int cc770_platform_probe(struct platform_device *pdev)int err, irq; mem =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - irq =platform_get_irq (pdev,0 ); -if (!mem || irq <=0 ) +if (!mem)return -ENODEV ; + irq =platform_get_irq (pdev,0 ); +if (irq <0 ) +return irq; + mem_size =resource_size (mem);if (!request_mem_region (mem->start, mem_size, pdev->name))return -EBUSY ;
Signature · 1 line
2.53.0
Marc Kleine-Budde
maintainerPATCH 7/13 can: sun4i_can: don't discard the IRQ lookup error in probe
In reply to Marc Kleine-BuddeFrom: Chaosheng Qu <[email protected]>
This is a robustness and consistency cleanup, this issue has not been seen on real hardware.
sun4ican_probe() collapses every failure of platform_get_irq() into -ENODEV:
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
err = -ENODEV;
goto exit_put_clk;
}The driver matches through an of_match_table, 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, which is what the neighbouring CAN platform drivers do, e.g. commit ("can: cc770: don't discard the IRQ lookup error in probe").
A device tree without an interrupt now reports -ENXIO rather than -ENODEV; the driver core treats both as a failed probe.
Build tested on x86_64.
--- drivers/net/can/sun4i_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/sun4i_can.c +1 -1
@@ -852,7 +852,7 @@ static int sun4ican_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { - err = -ENODEV ; + err = irq; goto exit; }
Signature · 1 line
2.53.0
Marc Kleine-Budde
maintainerPATCH 8/13 can: at91_can: don't discard the IRQ lookup error in probe
In reply to Marc Kleine-BuddeFrom: Chaosheng Qu <[email protected]>
This is a robustness and consistency cleanup, this issue has not been seen on real hardware.
at91_can_probe() looks up the memory resource and the interrupt together and collapses both failures into -ENODEV:
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq = platform_get_irq(pdev, 0);
if (!res || irq <= 0) {
err = -ENODEV;
goto exit_put;
}The irq <= 0 test also covers a 0 return, which platform_get_irq() never produces; it warns and returns -EINVAL instead.
Split the two lookups: the memory resource keeps -ENODEV, the interrupt returns the lookup error unchanged, as the neighbouring CAN platform drivers do, e.g. commit ("can: cc770: don't discard the IRQ lookup error in probe"). This also drops an IRQ lookup that cannot succeed when the memory resource is missing.
A device tree without an interrupt now reports -ENXIO rather than -ENODEV; the driver core treats both as a failed probe.
Build tested on x86_64.
--- drivers/net/can/at91_can.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/can/at91_can.c +7 -2
@@ -1069,12 +1069,17 @@ static int at91_can_probe(struct platform_device *pdev) } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - irq =platform_get_irq (pdev,0 ); -if (!res || irq <=0 ) { +if (!res) { err = -ENODEV ; goto exit_put; } + irq =platform_get_irq (pdev,0 ); +if (irq <0 ) { + err = irq; + goto exit_put; + } +if (!request_mem_region (res->start,resource_size (res), pdev->name)) {
Signature · 1 line
2.53.0
[email protected]
AI reviewRe: [PATCH net-next 08/13] can: at91_can: don't discard the IRQ lookup error in probe
Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce: - [High] can: at91_can: missing…
Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce:
- [High] can: at91_can: missing priv->transceiver assignment in at91_can_probe() [1]
--
commit fb6d34ef2c907ec33aacc966536e1987c18e5222
Author: Chaosheng Qu <[email protected]>
can: at91_can: don't discard the IRQ lookup error in probe
This commit splits the memory resource and interrupt lookups in at91_can_probe() and propagates the error returned by platform_get_irq().
Quoted 14 lines
drivers/net/can/at91_can.c +1
-2@@ -1069,12 +1069,17 @@ static int at91_can_probe(struct platform_device *pdev) } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - irq =platform_get_irq (pdev,0 ); -if (!res || irq <=0 ) { +if (!res) { err = -ENODEV ; goto exit_put; }
drivers/net/can/at91_can.c static int at91_can_probe(struct platform_device *pdev) · line 1085
Quoted 10 lines
drivers/net/can/at91_can.c +6
-0+ irq =platform_get_irq (pdev,0 ); +if (irq <0 ) { + err = irq; + goto exit_put; + } +if (!request_mem_region (res->start,resource_size (res), pdev->name)) {
[Severity: High]
This problem wasn't introduced by this patch, but should at91_can_probe() also assign transceiver to priv->transceiver [1]?
Later in at91_can_probe(), devm_phy_optional_get() stores the PHY in the local transceiver variable and uses it to populate priv->can.bitrate_max, but priv->transceiver is left NULL:
drivers/net/can/at91_can.c:at91_can_probe() {
...
transceiver = devm_phy_optional_get(&pdev->dev, NULL);
...
if (transceiver)
priv->can.bitrate_max = transceiver->attrs.max_link_rate;
...
}Because priv->transceiver is never set, phy_power_on() in at91_open() and phy_power_off() in at91_close() are no-ops, leaving the CAN transceiver unpowered when the interface is brought up on boards that manage it via the PHY framework.
[1] https://sashiko.dev/#/bug/linux-940d736c-5531-4ec5-97e9-70c51890e25e
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=8
Marc Kleine-Budde
maintainerPATCH 9/13 can: janz-ican3: don't discard the IRQ lookup error in probe
In reply to Marc Kleine-BuddeFrom: Chaosheng Qu <[email protected]>
This is a robustness and consistency cleanup, this issue has not been seen on real hardware.
ican3_probe() collapses every failure of platform_get_irq() into -ENODEV:
mod->irq = platform_get_irq(pdev, 0);
if (mod->irq < 0) {
ret = -ENODEV;
goto out_free_ndev;
}Return the lookup error unchanged, as the neighbouring CAN platform drivers do, e.g. commit ("can: cc770: don't discard the IRQ lookup error in probe").
This driver cannot see -EPROBE_DEFER and the change does not fix a deferred probe. The device is an MFD child of janz-cmodio, which takes the interrupt from the carrier board's PCI device, and the driver has neither an of_match_table nor an ACPI match. The probe should not invent an error code for a lookup that failed for another reason.
Build tested on x86_64.
--- drivers/net/can/janz-ican3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/janz-ican3.c +1 -1
@@ -1944,7 +1944,7 @@ static int ican3_probe(struct platform_device *pdev)/* find our IRQ number */ mod->irq =platform_get_irq (pdev,0 );if (mod->irq <0 ) { - ret = -ENODEV ; + ret = mod->irq; goto out_free_ndev; }
Signature · 1 line
2.53.0
Marc Kleine-Budde
maintainerPATCH 10/13 can: ifi_canfd: don't discard the IRQ lookup error in probe
In reply to Marc Kleine-BuddeFrom: Chaosheng Qu <[email protected]>
This is a robustness and consistency cleanup, this issue has not been seen on real hardware.
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. 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.
--- drivers/net/can/ifi_canfd/ifi_canfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/ifi_canfd/ifi_canfd.c +1 -1
@@ -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 ) {
Signature · 1 line
2.53.0
Marc Kleine-Budde
maintainerPATCH 11/13 can: remove Softing CANcard driver
In reply to Marc Kleine-BuddeFrom: Oliver Hartkopp <[email protected]>
The PCMCIA Softing CANcard2 is discontinued since 2013 and the latest Windows drivers date back to Windows 7/8. The CANcard2 and also the rebranded Vector CANcardXL make use of a firmware to drive its onboard CPU to handle raw CAN messages (DPRAM) and its capability to perform timing critical Classical CAN protocols like ISO 15765-2:2004.
The Softing Linux driver supported none of those higher layer CAN protocols but only raw CAN CC traffic. In 2026 this functionality is substituted with cost-effective USB CAN adapters, e.g. gs_usb.
Remove the softing driver as there's no known user and we lack the access to this at least 25 y/o hardware for 10 years now.
--- drivers/net/can/Kconfig | 1 - drivers/net/can/Makefile | 1 - drivers/net/can/softing/Kconfig | 31 - drivers/net/can/softing/Makefile | 5 - drivers/net/can/softing/softing.h | 168 ---- drivers/net/can/softing/softing_cs.c | 335 -------- drivers/net/can/softing/softing_fw.c | 700 ----------------- drivers/net/can/softing/softing_main.c | 864 --------------------- drivers/net/can/softing/softing_platform.h | 41 - 9 files changed, 2146 deletions(-) delete mode 100644 drivers/net/can/softing/Kconfig delete mode 100644 drivers/net/can/softing/Makefile delete mode 100644 drivers/net/can/softing/softing.h delete mode 100644 drivers/net/can/softing/softing_cs.c delete mode 100644 drivers/net/can/softing/softing_fw.c delete mode 100644 drivers/net/can/softing/softing_main.c delete mode 100644 drivers/net/can/softing/softing_platform.h
drivers/net/can/Kconfig +0 -1
@@ -254,7 +254,6 @@ source "drivers/net/can/peak_canfd/Kconfig" source "drivers/net/can/rcar/Kconfig" source "drivers/net/can/rockchip/Kconfig" source "drivers/net/can/sja1000/Kconfig" -source "drivers/net/can/softing/Kconfig" source "drivers/net/can/spi/Kconfig" source "drivers/net/can/usb/Kconfig"
drivers/net/can/Makefile +0 -1
@@ -13,7 +13,6 @@ obj-y += rcar/ obj-y += rockchip/ obj-y += spi/ obj-y += usb/ -obj-y += softing/ obj-$(CONFIG_CAN_AT91) += at91_can.o obj-$(CONFIG_CAN_BXCAN) += bxcan.o
drivers/net/can/softing/Kconfig deleted +0 -31
@@ -1,31 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -config CAN_SOFTING - tristate "Softing Gmbh CAN generic support" - depends on HAS_IOMEM - help - Support for CAN cards from Softing Gmbh & some cards - from Vector Gmbh. - Softing Gmbh CAN cards come with 1 or 2 physical buses. - Those cards typically use Dual Port RAM to communicate - with the host CPU. The interface is then identical for PCI - and PCMCIA cards. This driver operates on a platform device, - which has been created by softing_cs or softing_pci driver. - Warning: - The API of the card does not allow fine control per bus, but - controls the 2 buses on the card together. - As such, some actions (start/stop/busoff recovery) on 1 bus - must bring down the other bus too temporarily. - -config CAN_SOFTING_CS - tristate "Softing Gmbh CAN pcmcia cards" - depends on PCMCIA - depends on CAN_SOFTING - help - Support for PCMCIA cards from Softing Gmbh & some cards - from Vector Gmbh. - You need firmware for these, which you can get at - https://github.com/linux-can/can-firmware - This version of the driver is written against - firmware version 4.6 (softing-fw-4.6-binaries.tar.gz) - In order to use the card as CAN device, you need the Softing generic - support too.
drivers/net/can/softing/Makefile deleted +0 -5
@@ -1,5 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -softing-y := softing_main.o softing_fw.o -obj-$(CONFIG_CAN_SOFTING) += softing.o -obj-$(CONFIG_CAN_SOFTING_CS) += softing_cs.o
drivers/net/can/softing/softing.h deleted +0 -168
168 lines not on this page · raw message
drivers/net/can/softing/softing_cs.c deleted +0 -335
335 lines not on this page · raw message
drivers/net/can/softing/softing_fw.c deleted +0 -700
700 lines not on this page · raw message
drivers/net/can/softing/softing_main.c deleted +0 -864
864 lines not on this page · raw message
drivers/net/can/softing/softing_platform.h deleted +0 -41
41 lines not on this page · raw message
Signature · 1 line
2.53.0
Marc Kleine-Budde
maintainerPATCH 12/13 can: ucan: fix repeated word 'is' in comment
In reply to Marc Kleine-BuddeFrom: Hemanth Selam <[email protected]>
Drop the second 'is', reported by checkpatch.pl as a possible repeated word. Only touches a comment, no code changes.
This patch was created with LLM assistance.
--- drivers/net/can/usb/ucan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/usb/ucan.c +1 -1
@@ -61,7 +61,7 @@* the following way: * * m[n].len <=> the length if message n(including the header in bytes) -* m[n] is is aligned to a 4 byte boundary, hence +* m[n] is aligned to a 4 byte boundary, hence * offset(m[0]) := 0; * offset(m[n+1]) := offset(m[n]) + (m[n].len + 3) & 3 *
Signature · 1 line
2.53.0
Marc Kleine-Budde
maintainerPATCH 13/13 can: xilinx_can: set CAN FD flags on received frames
In reply to Marc Kleine-BuddeFrom: Maximilian Zimmermann <[email protected]>
The Xilinx CAN FD controller reports the bit rate switch (BRS) and error state indicator (ESI) in the receive buffer DLC register. The receive path currently uses this register to determine frame format and payload length, but does not set BRS and ESI in struct canfd_frame::flags.
This results in applications being unable to receive the BRS and ESI flags, even when the controller correctly received them.
Add the ESI register mask and copy the controller flags to the corresponding SocketCAN canfd_frame struct.
--- drivers/net/can/xilinx_can.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/can/xilinx_can.c +6 -0
@@ -157,6 +157,7 @@ enum xcan_reg {#define XCAN_2_FSR_RI_MASK 0x0000003F/* RX Read Index */ #define XCAN_DLCR_EDL_MASK 0x08000000/* EDL Mask in DLC */ #define XCAN_DLCR_BRS_MASK 0x04000000/* BRS Mask in DLC */ +#define XCAN_DLCR_ESI_MASK 0x02000000/* ESI Mask in DLC */ #define XCAN_ECC_CFG_REECRX_MASK BIT(2)/* Reset RX FIFO ECC error counters */ #define XCAN_ECC_CFG_REECTXOL_MASK BIT(1)/* Reset TXOL FIFO ECC error counters */ #define XCAN_ECC_CFG_REECTXTL_MASK BIT(0)/* Reset TXTL FIFO ECC error counters */
@@ -959,6 +960,11 @@ static int xcanfd_rx(struct net_device *ndev, int frame_base)/* Check the frame received is FD or not*/ if (dlc &XCAN_DLCR_EDL_MASK ) { +if (dlc &XCAN_DLCR_BRS_MASK ) + cf->flags |=CANFD_BRS ; +if (dlc &XCAN_DLCR_ESI_MASK ) + cf->flags |=CANFD_ESI ; +for (i =0 ; i < cf->len; i +=4 ) { dw_offset =XCANFD_FRAME_DW_OFFSET (frame_base) + (dwindex *XCANFD_DW_BYTES );
Signature · 1 line
2.53.0