All of lore.kernel.org
 help / color / mirror / Atom feed
From: Holger Schurig <holgerschurig@gmail.com>
To: linux-can@vger.kernel.org
Subject: CAN question: how to trace frame errors?
Date: Fri, 12 Jun 2015 11:29:25 +0200	[thread overview]
Message-ID: <CAOpc7mFv6ePXqkCZxRkCOC+BuY-PC14nAopZyFpEKHvj5gN_tw@mail.gmail.com> (raw)

Hi people,

I have two i.MX6 based boards with built-in FLEXCAN. On both boards I
loaded can_raw.

When I now run "cangen can0 -g 0 -x" one one board, I get frame errors
on the others (no matter if I run candump on the receiving side).


root@left:~# ifconfig can0; ip -s link show can0
can0      Link encap:UNSPEC  HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP RUNNING NOARP  MTU:16  Metric:1
          RX packets:20249437 errors:6 dropped:0 overruns:0 frame:6
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:116445504 (111.0 MiB)  TX bytes:0 (0.0 B)
          Interrupt:142

3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state
UNKNOWN mode DEFAULT group default qlen 10
    link/can
    RX: bytes  packets  errors  dropped overrun mcast
    116445504  20249437 6       0       6       0
    TX: bytes  packets  errors  dropped carrier collsns
    0          0        0       0       0       0


In drivers/net/can/flexcan.c I activated all the netdev_dbg() calls,
to see if it is the flexcan IP inside the i.MX6 that gives me a bus
error. This is unfortunately not the case.

And now I'm at a loss to find out where the CAN frames errors might be
come from. I'm not fluent in the Linux networking layers, I even don't
yet know in which struct the frame and error counters reside.



PS: kernel is 3.18.14 with the patches to flexcan from 4.1-rc7 and
also the drivers/net/can patch "can: dev: Consolidate and unify state
change handling". However, I noticed this frame errors the first times
before I applied the patches.

Holger

             reply	other threads:[~2015-06-12  9:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12  9:29 Holger Schurig [this message]
2015-06-12  9:34 ` CAN question: how to trace frame errors? Marc Kleine-Budde
2015-06-12 10:01   ` Holger Schurig
2015-06-12 12:33     ` Tom Evans
2015-06-12 14:24       ` Holger Schurig
2015-06-13 15:30         ` Tom Evans
2015-06-13 20:28           ` Holger Schurig
2015-06-14  2:42             ` Tom Evans
2015-06-22 12:17               ` Holger Schurig
2015-06-22 13:15                 ` Marc Kleine-Budde
2015-06-24 14:29                   ` Holger Schurig
2015-06-25  8:37                     ` Tom Evans

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=CAOpc7mFv6ePXqkCZxRkCOC+BuY-PC14nAopZyFpEKHvj5gN_tw@mail.gmail.com \
    --to=holgerschurig@gmail.com \
    --cc=linux-can@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.