linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* flexcan napi poll and error frames
@ 2014-10-24 10:26 Andri Yngvason
  2014-10-24 10:43 ` Wolfgang Grandegger
  0 siblings, 1 reply; 12+ messages in thread
From: Andri Yngvason @ 2014-10-24 10:26 UTC (permalink / raw)
  To: linux-can, Marc Kleine-Budde

Hi,

I was running some tests on my patches when I noticed the following:
If I have 2 flexcan devices on the bus, each sending to the bus using
cangen,and then I disconnect the cable to one of them, that device
will enter"error-warning" state, but it will not continue on to
"error-passive" as itshould.

However, when I reconnect the cable, I get the "error-passive" message
followed by an "error-warning" and eventually "back-to-error-active".

Notice the time differences:
root@(none):~# candump -td -e can0,0~0,#FFFFFFFFFF
 (000.000000)  can0  20000004   [8]  00 08 00 00 00 00 00 00   ERRORFRAME
        controller-problem{tx-error-warning}
 (006.493209)  can0  20000004   [8]  00 40 00 00 00 00 00 00   ERRORFRAME
        controller-problem{back-to-error-active}
 (002.701331)  can0  20000004   [8]  00 08 00 00 00 00 00 00   ERRORFRAME
        controller-problem{tx-error-warning}
 (006.498567)  can0  20000004   [8]  00 20 00 00 00 00 00 00   ERRORFRAME
        controller-problem{tx-error-passive}
 (000.013915)  can0  20000004   [8]  00 08 00 00 00 00 00 00   ERRORFRAME
        controller-problem{tx-error-warning}
 (001.990695)  can0  20000004   [8]  00 40 00 00 00 00 00 00   ERRORFRAME
        controller-problem{back-to-error-active}


I suspect that the problem is that the driver doesn't receive any
interruptsother than the one for "error-passive" and so things
won't "weigh" enoughfor napi. There seems to be some truth in this
conjecture, because when Itried setting the napi weight to 1, the
message got through.

Another thing that I found peculiar was that I had to be sending on
both devices for the error states to change to anything other than
"error-warning".

Best regards,
Andri Yngvason

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

end of thread, other threads:[~2014-10-27 15:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-10-27 15:53                     ` Andri Yngvason
2014-10-24 19:08           ` Wolfgang Grandegger

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