From: Sascha Hauer <s.hauer@pengutronix.de>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: Socketcan-core@lists.berlios.de,
Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH V3] CAN: Add Flexcan CAN controller driver
Date: Fri, 31 Jul 2009 13:20:23 +0200 [thread overview]
Message-ID: <20090731112023.GJ2714@pengutronix.de> (raw)
In-Reply-To: <4A7200F3.3010608@grandegger.com>
On Thu, Jul 30, 2009 at 10:22:11PM +0200, Wolfgang Grandegger wrote:
> Wolfgang Grandegger wrote:
> > Sascha Hauer wrote:
> [...]
> >> errcnt = readl(®s->errcnt);
> >> rxerr = (errcnt >> 8) & 0xff;
> >> txerr = errcnt & 0xff;
> >> if ((rxerr >= 96 || txerr >= 96) && state == CAN_STATE_ERROR_ACTIVE)
> >> state = CAN_STATE_ERROR_WARNING;
> >
> > Yes, or do not handle the state in the "case 0" above appropriately. The
> > CAN spec only specifies the bus error states error active, error passive
> > and bus off. The warning is somehow optional but available on most CAN
> > controllers. Nevertheless, we should create a message if the ISR
> > realizes a state changes.
>
> FYI, I will be on holiday for the next 1.5 weeks.
Lucky you ;)
I just did some tests with the CAN cable disconnected. It turns out that
I get flooded by interrupts caused by ACK errors. The system is
completely unresponsive then. Unfortunately the ACK error interrupt
can't be disabled seperately, so we have to disable error interrupts
completely once we get an ACK error. I'm thinking about setting up a
timer and poll the error status register then.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2009-07-31 11:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-29 8:20 [PATCH V3] CAN: Add Flexcan CAN controller driver Sascha Hauer
2009-07-29 8:45 ` Oliver Hartkopp
2009-07-29 9:09 ` Wolfgang Grandegger
2009-07-30 8:37 ` Sascha Hauer
2009-07-30 8:51 ` Wolfgang Grandegger
2009-07-30 9:27 ` Sascha Hauer
2009-07-30 12:38 ` Wolfgang Grandegger
2009-07-30 20:22 ` Wolfgang Grandegger
2009-07-31 11:20 ` Sascha Hauer [this message]
2009-08-02 19:22 ` 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=20090731112023.GJ2714@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=Socketcan-core@lists.berlios.de \
--cc=netdev@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).