From: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: Martin Elshuber <martin.elshuber@theobroma-systems.com>,
Philipp Tomsich <philipp.tomsich@theobroma-systems.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
linux-can@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] can: ucan: add driver for Theobroma Systems UCAN devices
Date: Wed, 14 Mar 2018 10:48:04 +0100 [thread overview]
Message-ID: <5b3df9d5-3e65-1114-4b51-9dcc329cbc31@theobroma-systems.com> (raw)
In-Reply-To: <92e559b1-d392-015e-1aa1-0497cbd4c071@grandegger.com>
On 14.03.18 10:25, Wolfgang Grandegger wrote:
>> Counting the state changes is one thing but you should also generate
>> error messages for them.
>
> The usual test here is:
>
> $ candump -td -e any,0:0,#FFFFFFFF
>
> should report proper state changes, if you send messages with
>
> 1. no cable connected
> 2. CAN high and low short-circuited
>
> Also downwards if the hardware error is gone and you continue to send
> messages.
Yes, we do, the hardware does it. Testcases:
(1) no cable connected
> root@rk3399-q7:~# candump -td -e any,0:0,#FFFFFFFF | head -n 1000
> (000.000000) can0 178 [0]
> (000.000410) can0 20000030 [8] 00 00 00 00 00 00 08 00 ERRORFRAME
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{8}{0}}
> (000.000445) can0 20000030 [8] 00 00 00 00 00 00 10 00 ERRORFRAME
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{16}{0}}
> (000.000425) can0 20000030 [8] 00 00 00 00 00 00 18 00 ERRORFRAME
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{24}{0}}
> (000.000451) can0 20000030 [8] 00 00 00 00 00 00 20 00 ERRORFRAME
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{32}{0}}
> (000.000429) can0 20000030 [8] 00 00 00 00 00 00 28 00 ERRORFRAME
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{40}{0}}
> (000.000448) can0 20000030 [8] 00 00 00 00 00 00 30 00 ERRORFRAME
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{48}{0}}
> (000.000433) can0 20000030 [8] 00 00 00 00 00 00 38 00 ERRORFRAME
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{56}{0}}
> (000.000437) can0 20000030 [8] 00 00 00 00 00 00 40 00 ERRORFRAME
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{64}{0}}
> (000.000443) can0 20000030 [8] 00 00 00 00 00 00 48 00 ERRORFRAME
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{72}{0}}
> (000.000437) can0 20000030 [8] 00 00 00 00 00 00 50 00 ERRORFRAME
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{80}{0}}
> (000.000498) can0 20000030 [8] 00 00 00 00 00 00 58 00 ERRORFRAME
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{88}{0}}
> (000.000394) can0 20000034 [8] 00 0C 00 00 00 00 60 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning}
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{96}{0}}
> (000.000433) can0 20000034 [8] 00 0C 00 00 00 00 68 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning}
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{104}{0}}
> (000.000437) can0 20000034 [8] 00 0C 00 00 00 00 70 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning}
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{112}{0}}
> (000.000443) can0 20000034 [8] 00 0C 00 00 00 00 78 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning}
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{120}{0}}
> (000.000444) can0 20000034 [8] 00 3C 00 00 00 00 80 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{128}{0}}
> (000.000495) can0 20000024 [8] 00 3C 00 00 00 00 80 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> no-acknowledgement-on-tx
> error-counter-tx-rx{{128}{0}}
Repeats ad infinitum...
(1b) cable gets connected:
> (000.000883) can0 20000034 [8] 00 3C 00 00 00 00 80 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> transceiver-status
> no-acknowledgement-on-tx
> error-counter-tx-rx{{128}{0}}
> (000.000996) can0 20000004 [8] 00 0C 00 00 00 00 7F 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning}
> error-counter-tx-rx{{127}{0}}
(2) short circuit
> root@rk3399-q7:~# candump -td -e any,0:0,#FFFFFFFF | head -n 1000
> (000.000000) can0 6AB [7] 33 39 62 29 00 F5 31
> (000.000201) can0 20000018 [8] 00 00 08 00 00 00 18 00 ERRORFRAME
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{24}{0}}
> (000.000141) can0 2000000C [8] 00 3C 08 00 00 00 88 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> error-counter-tx-rx{{136}{0}}
> (000.000202) can0 2000001C [8] 00 3C 08 00 00 00 90 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{144}{0}}
> (000.000174) can0 2000001C [8] 00 3C 08 00 00 00 98 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{152}{0}}
> (000.000229) can0 2000001C [8] 00 3C 08 00 00 00 A0 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{160}{0}}
> (000.000191) can0 2000001C [8] 00 3C 08 00 00 00 A8 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{168}{0}}
> (000.000227) can0 2000001C [8] 00 3C 08 00 00 00 B0 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{176}{0}}
> (000.000204) can0 2000001C [8] 00 3C 08 00 00 00 B8 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{184}{0}}
> (000.000200) can0 2000001C [8] 00 3C 08 00 00 00 C0 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{192}{0}}
> (000.000216) can0 2000001C [8] 00 3C 08 00 00 00 C8 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{200}{0}}
> (000.000214) can0 2000001C [8] 00 3C 08 00 00 00 D0 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{208}{0}}
> (000.000188) can0 2000001C [8] 00 3C 08 00 00 00 D8 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{216}{0}}
> (000.000206) can0 2000001C [8] 00 3C 08 00 00 00 E0 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{224}{0}}
> (000.000202) can0 2000001C [8] 00 3C 08 00 00 00 E8 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{232}{0}}
> (000.000218) can0 2000001C [8] 00 3C 08 00 00 00 F0 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{240}{0}}
> (000.000203) can0 2000001C [8] 00 3C 08 00 00 00 F8 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> transceiver-status
> error-counter-tx-rx{{248}{0}}
> (000.007153) can0 2000004C [8] 00 3C 08 00 00 00 F8 00 ERRORFRAME
> controller-problem{rx-error-warning,tx-error-warning,rx-error-passive,tx-error-passive}
> protocol-violation{{tx-dominant-bit-error}{}}
> bus-off
> error-counter-tx-rx{{248}{0}}
next prev parent reply other threads:[~2018-03-14 9:48 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 17:35 [PATCH v2 0/1] " Jakob Unterwurzacher
2018-03-13 17:35 ` [PATCH v2 1/1] " Jakob Unterwurzacher
2018-03-13 17:44 ` Marc Kleine-Budde
2018-03-13 17:53 ` Jakob Unterwurzacher
2018-03-13 17:56 ` Marc Kleine-Budde
2018-03-14 7:51 ` Marc Kleine-Budde
2018-03-14 9:09 ` Jakob Unterwurzacher
2018-03-14 9:36 ` rx_packets/bytes stats for error frames (was: Re: [PATCH v2 1/1] can: ucan: add driver for Theobroma Systems UCAN devices) Marc Kleine-Budde
2018-03-14 9:46 ` rx_packets/bytes stats for error frames Wolfgang Grandegger
2018-03-14 9:57 ` Jakob Unterwurzacher
2018-03-14 9:11 ` [PATCH v2 1/1] can: ucan: add driver for Theobroma Systems UCAN devices Wolfgang Grandegger
2018-03-14 9:14 ` Jakob Unterwurzacher
2018-03-14 9:17 ` Wolfgang Grandegger
2018-03-14 9:21 ` Jakob Unterwurzacher
2018-03-14 9:25 ` Wolfgang Grandegger
2018-03-14 9:48 ` Jakob Unterwurzacher [this message]
2018-03-14 10:04 ` Wolfgang Grandegger
2018-03-14 10:19 ` Jakob Unterwurzacher
2018-03-14 19:07 ` Jakob Unterwurzacher
2018-03-15 6:58 ` Wolfgang Grandegger
2018-03-16 7:01 ` kbuild test robot
2018-03-16 12:14 ` kbuild test robot
2018-03-13 17:40 ` [PATCH v2 0/1] Open questions Jakob Unterwurzacher
[not found] ` <06378497-1ACE-4333-810F-4E3E4706CCD5@theobroma-systems.com>
2018-03-13 17:48 ` Jakob Unterwurzacher
2018-03-13 17:48 ` Marc Kleine-Budde
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=5b3df9d5-3e65-1114-4b51-9dcc329cbc31@theobroma-systems.com \
--to=jakob.unterwurzacher@theobroma-systems.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.elshuber@theobroma-systems.com \
--cc=mkl@pengutronix.de \
--cc=philipp.tomsich@theobroma-systems.com \
--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
all inboxes | Powered by JetHome®