From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>, linux-can@vger.kernel.org
Subject: Re: [PATCH 4/4] can: flexcan: Disable error irq when in error passive
Date: Thu, 14 Aug 2014 15:58:19 +0200 [thread overview]
Message-ID: <53ECC07B.8030105@pengutronix.de> (raw)
In-Reply-To: <2700138.iRYuM1TADC@ws-stein>
[-- Attachment #1: Type: text/plain, Size: 1947 bytes --]
On 08/14/2014 03:19 PM, Alexander Stein wrote:
> On Thursday 14 August 2014 13:18:47, Marc Kleine-Budde wrote:
>> On 08/12/2014 03:43 PM, Alexander Stein wrote:
>>> If the error irq is enabled and the hardware is trying to send a CAN
>>> message to an open bus it will receive a lot of acknowledge errors and
>>> generating lots of interrupts. So error interrupts are disabled when
>>> entering error passive and reenable them when leaving error passive.
>>> We can only leave error passive by receiving CAN frames in which case NAPI
>>> is scheduled anyway or by sending more CAN frames when send is possible
>>> again. But with the transition of error counters from 96 to 95 the flags
>>> TX_WRN and RX_WRN are gone again, so we need to remember the flags state
>>> to detect a change there.
>>
>> There are use cases where the error interrupts even when in passive mode
>> are essential. You have a use case, where you'd like to turn them off
>> completely. Have you had a look at the bus error limiting patches?
>
> Do you mean "[PATCH v7] flexcan: add err_irq handler for flexcan" from Zhao Qiang?
No, sorry I assumes you were following the discussion with Matthias
Klein and Sebastian Andrzej Siewior [1].
I was talking about the patch from
http://comments.gmane.org/gmane.linux.can/4070
The idea behind this series is to not enable the bus error interrupt
right after it has served, but after a configurable delay, e.g. 100ms.
Even with an open or otherwise faulty but, you then receive just 10
error frames per second.
Marc
[1] http://thread.gmane.org/gmane.linux.can/6271
[2] http://thread.gmane.org/gmane.linux.can/6280
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2014-08-14 13:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 13:43 [PATCH 1/4 RESEND] can: flexcan: Disable error interrupt when bus error reporting is disabled Alexander Stein
2014-08-12 13:43 ` [PATCH 2/4] can: flexcan: Detect error passive state change Alexander Stein
2014-08-15 8:07 ` Marc Kleine-Budde
2014-08-18 6:05 ` Alexander Stein
2014-08-12 13:43 ` [PATCH 3/4] can: flexcan: Put enabling error irq into separate function Alexander Stein
2014-08-12 13:43 ` [PATCH 4/4] can: flexcan: Disable error irq when in error passive Alexander Stein
2014-08-14 11:18 ` Marc Kleine-Budde
2014-08-14 13:19 ` Alexander Stein
2014-08-14 13:58 ` Marc Kleine-Budde [this message]
2014-08-20 5:53 ` Alexander Stein
2014-08-14 10:21 ` [PATCH 1/4 RESEND] can: flexcan: Disable error interrupt when bus error reporting is disabled Marc Kleine-Budde
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=53ECC07B.8030105@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=alexander.stein@systec-electronic.com \
--cc=linux-can@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).