From: David Jander <david@protonic.nl>
To: Andri Yngvason <andri.yngvason@marel.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>, linux-can@vger.kernel.org
Subject: Re: flexcan napi poll and error frames
Date: Mon, 27 Oct 2014 15:01:11 +0100 [thread overview]
Message-ID: <20141027150111.08248771@archvile> (raw)
In-Reply-To: <544E2C19.1050608@marel.com>
On Mon, 27 Oct 2014 11:27:21 +0000
Andri Yngvason <andri.yngvason@marel.com> wrote:
> Hi David,
>
> On mán 27.okt 2014 07:29, David Jander wrote:
> > Andri Yngvason <andri.yngvason@marel.com> wrote:
> >
> >> On fös 24.okt 2014 16:36, Steffen Rose wrote:
> >>> Hello,
> >>>
> >>> Am Freitag, 24. Oktober 2014, 16:04:56 schrieben Sie:
> >>>>> We can do little if the CAN controller does not notify the Software
> >>>>>> via interrupt.
> >>>>> Yes, that's why I wanted to figure out if it's a controller problem or
> >>>>> not.
> >>>>> Turns out it's a controller problem, but perhaps we can work around it?
> >>>>> E.g. if we check esr for state changes every time someone transmits a
> >>>>> frame, both of these problems would go away. Would it be unacceptable
> >>>>> overhead to do so?
> >>>> I've just confirmed that this "fix" works, but only if berr-reporting is
> >>>> enabled.
> >>> Is this workaround working in case of an open CAN Bus?
> >>> (Ack error situation)
> >> Yes
> >>> The flexcan can generate an error interrupt after every CAN bus error.
> >>> But in case of an error situation the interrupt load would be very high
> >>> (e.g. short circuit of the CAN).
> >>>
> >> That's what berr-reporting does, right? Considering that when the bus is
> >> flooded with errors, things are in a pretty bad shape anyway, I think it's
> >> not really going to contribute much to the over-all mess to just leave the
> >> error interrupts on all the time. It's far worse if the user doesn't get
> >> the correct error state.
> >>
> >> Anyway, defensive measures can be taken. When the bus has reached
> >> error-passive, the driver is not going to need those interrupts any more
> >> so it could turn off the interrupts until the bus goes to bus-off or back
> >> down to warning or active; except when berr-reporting is enabled.
> > Would you mind trying out the patch series posted a few days ago here:
> >
> > http://article.gmane.org/gmane.linux.can/6654
> >
> > It applies to the flexcan-next branch of
> > git://gitorious.org/linux-can/linux-can-next.git
> > (base commit should be 907aa2d61697035a921cad6375c0d546b1d18af6 if HEAD
> > fails).
> >
> > I think it solves your problem.
> >
> Sure, I'll try those patches, but applying them is non-trivial. I.e. they
> don't apply. Patching the base commit fails after "Applying: can: rx-fifo:
> fix long lines". Could you maybe just send me a link to a git repo or branch
> where they're already applied? A single .patch file might also work.
Hmmm. It seems that tree is kind of a moving target sometimes....
Here's a link to the whole series re-based on top of vanilla 3.17:
https://github.com/yope/linux/tree/flexcan-v3.17
I hope this works for you.
Best regards,
--
David Jander
Protonic Holland.
next prev parent reply other threads:[~2014-10-27 14:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 10:26 flexcan napi poll and error frames Andri Yngvason
2014-10-24 10:43 ` Wolfgang Grandegger
2014-10-24 10:55 ` Andri Yngvason
2014-10-24 12:33 ` Wolfgang Grandegger
2014-10-24 14:39 ` Andri Yngvason
2014-10-24 16:04 ` Andri Yngvason
2014-10-24 16:36 ` Steffen Rose
2014-10-24 17:40 ` Andri Yngvason
2014-10-27 7:29 ` David Jander
[not found] ` <544E2C19.1050608@marel.com>
2014-10-27 14:01 ` David Jander [this message]
2014-10-27 15:53 ` Andri Yngvason
2014-10-24 19:08 ` Wolfgang Grandegger
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=20141027150111.08248771@archvile \
--to=david@protonic.nl \
--cc=andri.yngvason@marel.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
/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).