From: Stephen Hemminger <shemminger@vyatta.com>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: Linux Netdev List <netdev@vger.kernel.org>,
SocketCAN Core Mailing List <socketcan-core@lists.berlios.de>
Subject: Re: [PATCH] iproute2: netlink support for bus-error reporting and counters
Date: Wed, 3 Mar 2010 16:47:20 -0800 [thread overview]
Message-ID: <20100303164720.1890c9f5@nehalam> (raw)
In-Reply-To: <4B8390D7.5010409@grandegger.com>
On Tue, 23 Feb 2010 09:24:55 +0100
Wolfgang Grandegger <wg@grandegger.com> wrote:
> This patch uses the new features of the kernel's netlink CAN interface
> making the bus-error reporting configurable and allowing to retrieve
> the CAN TX and RX bus error counters via netlink interface. Here is the
> output of my test session showing how to use them:
>
> # ip link set can0 up type can bitrate 500000 berr-reporting on
> # ip -d -s link show can0
> 2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
> link/can
> can <BERR-REPORTING> state ERROR-PASSIVE (berr-counter tx 128 rx 0) restart-ms 0
> CAN bus error counter values ^^^^^^^^^^^
> bitrate 500000 sample-point 0.875
> tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
> sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
> clock 8000000
> re-started bus-errors arbit-lost error-warn error-pass bus-off
> 0 54101 0 1 1 0
> RX: bytes packets errors dropped overrun mcast
> 432808 54101 54101 0 0 0
> TX: bytes packets errors dropped carrier collsns
> 0 0 0 0 0 0
>
> # ifconfig can0 down
> # ip link set can0 up type can berr-reporting off
> # candump -t d any,0:0,#FFFFFFFF
> (0.000000) can0 20000004 [8] 00 08 00 00 00 00 60 00 ERRORFRAME
> (0.000474) can0 20000004 [8] 00 20 00 00 00 00 80 00 ERRORFRAME
> ^^ ^^
> \ \___ rxerr
> \_____ txerr
>
> Furthermore, the missing support for one-shot mode has been added.
>
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Applied, I had already got the header file changes as part of the
net-next header file resync.
prev parent reply other threads:[~2010-03-04 0:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-23 8:24 [PATCH] iproute2: netlink support for bus-error reporting and counters Wolfgang Grandegger
2010-03-04 0:47 ` Stephen Hemminger [this message]
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=20100303164720.1890c9f5@nehalam \
--to=shemminger@vyatta.com \
--cc=netdev@vger.kernel.org \
--cc=socketcan-core@lists.berlios.de \
--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).