From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Brandon Maier <brandon.maier@rockwellcollins.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Ludovic Desroches <ludovic.desroches@microchip.com>,
"open list:CAN NETWORK DRIVERS" <linux-can@vger.kernel.org>,
"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
"moderated list:ARM/Microchip (AT91) SoC support"
<linux-arm-kernel@lists.infradead.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] can: at91_can: fix passive-state AERR flooding
Date: Sun, 17 Oct 2021 14:46:13 +0200 [thread overview]
Message-ID: <20211017124613.ttplab5ydklehvxd@pengutronix.de> (raw)
In-Reply-To: <20211005183023.109328-1-brandon.maier@rockwellcollins.com>
[-- Attachment #1: Type: text/plain, Size: 1272 bytes --]
On 05.10.2021 13:30:23, Brandon Maier wrote:
> When the at91_can is a single node on the bus and a user attempts to
> transmit, the can state machine will report ack errors and increment the
> transmit error count until it reaches the passive-state. Per the
> specification, it will then transmit with a passive error, but will stop
> incrementing the transmit error count. This results in the host machine
> being flooded with the AERR interrupt forever, or until another node
> rejoins the bus.
>
> To prevent the AERR flooding, disable the AERR interrupt when we are in
> passive mode.
Can you implement Bus Error Reporting?
| https://elixir.bootlin.com/linux/v5.14/source/include/uapi/linux/can/netlink.h#L99
This way the user can control if bus errors, and the ACK error is one of
them, should be reported. Bus error reporting is disabled by default. I
think enabling AT91_IRQ_ERR_FRAME only if CAN_CTRLMODE_BERR_REPORTING is
active should do the trick.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2021-10-17 12:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 18:30 [PATCH] can: at91_can: fix passive-state AERR flooding Brandon Maier
2021-10-07 13:28 ` Nicolas Ferre
2021-10-17 12:46 ` Marc Kleine-Budde [this message]
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=20211017124613.ttplab5ydklehvxd@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=alexandre.belloni@bootlin.com \
--cc=brandon.maier@rockwellcollins.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=wg@grandegger.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