mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] can: ctucanfd: ctucan_err_interrupt(): do not emit info messages on Arbitration Lost or CAN Bus Error IRQs
@ 2026-08-06 14:07 Marc Kleine-Budde
  2026-08-14 23:02 ` Pavel Pisa
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2026-08-06 14:07 UTC (permalink / raw)
  To: Pavel Pisa, Ondrej Ille, Vincent Mailhol, Avi Weiss
  Cc: Pavel Pisa, linux-can, linux-kernel, kernel, Marc Kleine-Budde

Since commit e74bae899529 ("can: ctucanfd: handle bus error interrupts")
CAN bus error interrupts are properly handled.

With activated CAN Bus Error reporting, Arbitration Lost (ALI) and Bus Error
(BEI) interrupts are enabled. These can occur at a very high rate (~10kHz).

To avoid flooding the system, don't emit a netdev_info() for these.

Fixes: e74bae899529 ("can: ctucanfd: handle bus error interrupts")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/ctucanfd/ctucanfd_base.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/can/ctucanfd/ctucanfd_base.c b/drivers/net/can/ctucanfd/ctucanfd_base.c
index 07d4aa43c700..9aec18681fc5 100644
--- a/drivers/net/can/ctucanfd/ctucanfd_base.c
+++ b/drivers/net/can/ctucanfd/ctucanfd_base.c
@@ -884,8 +884,6 @@ static void ctucan_err_interrupt(struct net_device *ndev, u32 isr)
 
 	/* Check for Arbitration Lost interrupt */
 	if (FIELD_GET(REG_INT_STAT_ALI, isr)) {
-		if (dologerr)
-			netdev_info(ndev, "arbitration lost\n");
 		priv->can.can_stats.arbitration_lost++;
 		if (skb) {
 			cf->can_id |= CAN_ERR_LOSTARB;
@@ -895,7 +893,6 @@ static void ctucan_err_interrupt(struct net_device *ndev, u32 isr)
 
 	/* Check for Bus Error interrupt */
 	if (FIELD_GET(REG_INT_STAT_BEI, isr)) {
-		netdev_info(ndev, "bus error\n");
 		priv->can.can_stats.bus_error++;
 		stats->rx_errors++;
 		if (skb) {

---
base-commit: cd0784790d921ff4f7438d3b7ccda86068c8b766
change-id: 20260805-ctucanfd-silence-can-bus-error-messages-5c5bcd6860f8

Best regards,
--  
Marc Kleine-Budde <mkl@pengutronix.de>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] can: ctucanfd: ctucan_err_interrupt(): do not emit info messages on Arbitration Lost or CAN Bus Error IRQs
  2026-08-06 14:07 [PATCH] can: ctucanfd: ctucan_err_interrupt(): do not emit info messages on Arbitration Lost or CAN Bus Error IRQs Marc Kleine-Budde
@ 2026-08-14 23:02 ` Pavel Pisa
  2026-08-18  9:54   ` Marc Kleine-Budde
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Pisa @ 2026-08-14 23:02 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: Ondrej Ille, Vincent Mailhol, Avi Weiss, linux-can, linux-kernel,
	kernel, Jiri Novak

Hello Marc,

On Thursday 06 of August 2026 16:07:29 Marc Kleine-Budde wrote:
> Since commit e74bae899529 ("can: ctucanfd: handle bus error interrupts")
> CAN bus error interrupts are properly handled.
>
> With activated CAN Bus Error reporting, Arbitration Lost (ALI) and Bus
> Error (BEI) interrupts are enabled. These can occur at a very high rate
> (~10kHz).
>
> To avoid flooding the system, don't emit a netdev_info() for these.
>
> Fixes: e74bae899529 ("can: ctucanfd: handle bus error interrupts")
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  drivers/net/can/ctucanfd/ctucanfd_base.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/net/can/ctucanfd/ctucanfd_base.c
> b/drivers/net/can/ctucanfd/ctucanfd_base.c index 07d4aa43c700..9aec18681fc5
> 100644
> --- a/drivers/net/can/ctucanfd/ctucanfd_base.c
> +++ b/drivers/net/can/ctucanfd/ctucanfd_base.c
> @@ -884,8 +884,6 @@ static void ctucan_err_interrupt(struct net_device
> *ndev, u32 isr)
>
>  	/* Check for Arbitration Lost interrupt */
>  	if (FIELD_GET(REG_INT_STAT_ALI, isr)) {
> -		if (dologerr)
> -			netdev_info(ndev, "arbitration lost\n");
>  		priv->can.can_stats.arbitration_lost++;
>  		if (skb) {
>  			cf->can_id |= CAN_ERR_LOSTARB;
> @@ -895,7 +893,6 @@ static void ctucan_err_interrupt(struct net_device
> *ndev, u32 isr)
>
>  	/* Check for Bus Error interrupt */
>  	if (FIELD_GET(REG_INT_STAT_BEI, isr)) {
> -		netdev_info(ndev, "bus error\n");
>  		priv->can.can_stats.bus_error++;
>  		stats->rx_errors++;
>  		if (skb) {
>
> ---
> base-commit: cd0784790d921ff4f7438d3b7ccda86068c8b766
> change-id: 20260805-ctucanfd-silence-can-bus-error-messages-5c5bcd6860f8

Acked-by: Pavel Pisa <pisa@fel.cvut.cz>

In the fact, I am in doubts if ALI Arbitration lost interrupt
should be enabled even by CAN_CTRLMODE_BERR_REPORTING unconditionally.
There are lot of situations when error reporting is valuable
but overhead of arbitration lost could load system quite lot.
But on the other hand SocketCAN does not provide separate
reporting option to enable can_stats.arbitration_lost
updates so current code in ctucan_chip_start is proper option


	if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) {
		int_ena |= REG_INT_STAT_ALI |
			   REG_INT_STAT_BEI;
	}

PS1: I have been on vacations without e-mail and I will be next
week too, so sorry for possible delays and these PSs to
wrap up quickly what seems on hold before my leave. 

PS2: Marc and others, please, can you confirm if my patch
"docs: ctucanfd: fix swapped colors in legend for TX buffer FSM of CTU CAN FD"
https://lore.kernel.org/linux-can/d775feefa1c16d7ea7f42482483c81491f75ce6c.1785574572.git.pisa@cmp.felk.cvut.cz/
is on the right track or if I should repost it to somebody
other than Randy Dunlap and linux-doc to reach right
documentation maintainers.

PS3: Marc, please, have you received my question about problems
with CAN FD on iMX8plus CompuLab's IOT-DIN-IMX8PLUS.
Even manual specifies it as Std CAN only... Can it be
related to some SoC problems, even much lowered speeds
do not help so probably not transceiver HW, may be missing
information for TDC in DTS???

PS4: LPC and Open Source Summit Europe will be held in Prague.
Our submissions to OSSE have not been accepted, one
is on wait list still. Price is too high for my budget
when I bring open technology to others. I am not sure about LPC,
I consider to pay for Real-Time and Scheduling microconference
or something like that. I could presnet something about our mainline
and RT CAN latency testing or our other RT, RISC-V embedded
knowledge if there is interest and suggestion for miniconference, BoF,
so then I would be allowed. Anyway if you have interest to meet,
I will be in Prague and when not teaching, I will be happy to
reserve time. There would be real local enthusiast, free community
and access conference before these Linux Foundation ones

https://www.linuxdays.cz/2026/

I expect to show our HW ZOO there on the booth there as usual
so you can visit us at our university ground.

If there is interest in some community open and free access
meeting then I can negotiate lecture hall, computer rooms etc.
at our faculty when they are not used for teaching or other
events. For something relay interesting which fits in weekend
October 3-4, I would consider even abandon part pr whole of my
LinuxDays presence. No chance to meet during weekend after LPC
and next days, I have already taken these by Apache/NuttX conference
in Glasgow where we present our projects including Matlab Simulink
target for NuttX (and Linux).

Best wishes,

                Pavel

                Pavel Pisa
    phone:      +420 603531357
    e-mail:     pisa@cmp.felk.cvut.cz
    Department of Control Engineering FEE CVUT
    Karlovo namesti 13, 121 35, Prague 2
    university: http://control.fel.cvut.cz/
    personal:   http://cmp.felk.cvut.cz/~pisa
    social:     https://social.kernel.org/ppisa
    projects:   https://www.openhub.net/accounts/ppisa
    CAN related:http://canbus.pages.fel.cvut.cz/
    RISC-V education: https://comparch.edu.cvut.cz/
    Open Technologies Research Education and Exchange Services
    https://gitlab.fel.cvut.cz/otrees/org/-/wikis/home

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] can: ctucanfd: ctucan_err_interrupt(): do not emit info messages on Arbitration Lost or CAN Bus Error IRQs
  2026-08-14 23:02 ` Pavel Pisa
@ 2026-08-18  9:54   ` Marc Kleine-Budde
  2026-08-24  9:05     ` LinuxDays 2026 October 3 and 4 in Prague was: can: ctucanfd: ctucan_err_interrupt() Pavel Pisa
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2026-08-18  9:54 UTC (permalink / raw)
  To: Pavel Pisa
  Cc: Ondrej Ille, Vincent Mailhol, Avi Weiss, linux-can, linux-kernel,
	kernel, Jiri Novak

[-- Attachment #1: Type: text/plain, Size: 3894 bytes --]

On 15.08.2026 01:02:34, Pavel Pisa wrote:
> Acked-by: Pavel Pisa <pisa@fel.cvut.cz>

Thanks

> In the fact, I am in doubts if ALI Arbitration lost interrupt
> should be enabled even by CAN_CTRLMODE_BERR_REPORTING unconditionally.

ACK

> There are lot of situations when error reporting is valuable
> but overhead of arbitration lost could load system quite lot.

ACK

> But on the other hand SocketCAN does not provide separate
> reporting option to enable can_stats.arbitration_lost
> updates

If needed, this option can be added.

> so current code in ctucan_chip_start is proper option

So I'm thinking of sending a patch to disable the arbitration lost IRQ.

>
>
> 	if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) {
> 		int_ena |= REG_INT_STAT_ALI |
> 			   REG_INT_STAT_BEI;
> 	}


> PS1: I have been on vacations without e-mail and I will be next
> week too, so sorry for possible delays and these PSs to
> wrap up quickly what seems on hold before my leave.

Enjoy your leave and e-mail free time!

> PS2: Marc and others, please, can you confirm if my patch
> "docs: ctucanfd: fix swapped colors in legend for TX buffer FSM of CTU CAN FD"
> https://lore.kernel.org/linux-can/d775feefa1c16d7ea7f42482483c81491f75ce6c.1785574572.git.pisa@cmp.felk.cvut.cz/
> is on the right track or if I should repost it to somebody
> other than Randy Dunlap and linux-doc to reach right
> documentation maintainers.

I've included it in yesterdays^w todays PR.

> PS3: Marc, please, have you received my question about problems
> with CAN FD on iMX8plus CompuLab's IOT-DIN-IMX8PLUS.

yes

> Even manual specifies it as Std CAN only... Can it be
> related to some SoC problems, even much lowered speeds
> do not help so probably not transceiver HW, may be missing
> information for TDC in DTS???

The flexcan driver is not attached to the kernel's TDC infrastructure.
Maybe it needs some improvements.

> PS4: LPC and Open Source Summit Europe will be held in Prague.

I'll be there for LPC and E-OSS.

> Our submissions to OSSE have not been accepted, one
> is on wait list still. Price is too high for my budget
> when I bring open technology to others. I am not sure about LPC,
> I consider to pay for Real-Time and Scheduling microconference
> or something like that. I could presnet something about our mainline
> and RT CAN latency testing or our other RT, RISC-V embedded
> knowledge if there is interest and suggestion for miniconference, BoF,
> so then I would be allowed. Anyway if you have interest to meet,
> I will be in Prague and when not teaching, I will be happy to
> reserve time. There would be real local enthusiast, free community
> and access conference before these Linux Foundation ones
>
> https://www.linuxdays.cz/2026/
>
> I expect to show our HW ZOO there on the booth there as usual
> so you can visit us at our university ground.

I will arrive on Sunday, but I haven't booked a train yet. When does the
conference close on Sunday?

> If there is interest in some community open and free access
> meeting then I can negotiate lecture hall, computer rooms etc.
> at our faculty when they are not used for teaching or other
> events. For something relay interesting which fits in weekend
> October 3-4, I would consider even abandon part pr whole of my
> LinuxDays presence. No chance to meet during weekend after LPC
> and next days, I have already taken these by Apache/NuttX conference
> in Glasgow where we present our projects including Matlab Simulink
> target for NuttX (and Linux).

regards,
Marc

--
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   |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: LinuxDays 2026 October 3 and 4 in Prague was: can: ctucanfd: ctucan_err_interrupt()
  2026-08-18  9:54   ` Marc Kleine-Budde
@ 2026-08-24  9:05     ` Pavel Pisa
  0 siblings, 0 replies; 4+ messages in thread
From: Pavel Pisa @ 2026-08-24  9:05 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: Ondrej Ille, Vincent Mailhol, Avi Weiss, linux-can, linux-kernel,
	kernel, Jiri Novak

Hello Marc and others,

and thanks for support of our HW as well as CAN and Linux
in general.

On Tuesday 18 of August 2026 11:54:01 Marc Kleine-Budde wrote:
> On 15.08.2026 01:02:34, Pavel Pisa wrote:
...
> > Anyway if you have interest to meet,
> > I will be in Prague and when not teaching, I will be happy to
> > reserve time. There would be real local enthusiast, free community
> > and access conference before these Linux Foundation ones
> >
> > https://www.linuxdays.cz/2026/
> >
> > I expect to show our HW ZOO there on the booth there as usual
> > so you can visit us at our university ground.
>
> I will arrive on Sunday, but I haven't booked a train yet. When does the
> conference close on Sunday?

For this year, the program is not finalized yet, but the closing
session was on Sunday at 16:00 last year. The LinuxDays conference

  https://www.linuxdays.cz/

has a majority of talks in the Czech language (it is mainly local event).
Still, some are in English, and it is a place where a lot of local
hackerspaces and other groups (often including SUSE, Fedora, etc)
present projects. Sometimes, even advanced ones like 400G Traffic
Monitoring FPGA hardware by CESNET, some links are there

  https://ieeexplore.ieee.org/document/10035175
  https://github.com/CESNET/ndk-fpga
  https://github.com/CESNET/ipfixprobe

usually lot of embedded HW, Linux based,
retro HW etc.
   
Best wishes,

                Pavel Pisa
    phone:      +420 603531357
    e-mail:     pisa@cmp.felk.cvut.cz
    Department of Control Engineering FEE CVUT
    Karlovo namesti 13, 121 35, Prague 2
    university: http://control.fel.cvut.cz/
    personal:   http://cmp.felk.cvut.cz/~pisa
    social:     https://social.kernel.org/ppisa
    projects:   https://www.openhub.net/accounts/ppisa
    CAN related:http://canbus.pages.fel.cvut.cz/
    RISC-V education: https://comparch.edu.cvut.cz/
    Open Technologies Research Education and Exchange Services
    https://gitlab.fel.cvut.cz/otrees/org/-/wikis/home

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-24  9:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-06 14:07 [PATCH] can: ctucanfd: ctucan_err_interrupt(): do not emit info messages on Arbitration Lost or CAN Bus Error IRQs Marc Kleine-Budde
2026-08-14 23:02 ` Pavel Pisa
2026-08-18  9:54   ` Marc Kleine-Budde
2026-08-24  9:05     ` LinuxDays 2026 October 3 and 4 in Prague was: can: ctucanfd: ctucan_err_interrupt() Pavel Pisa

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®