From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Wolfgang Grandegger <wg@grandegger.com>,
Andri Yngvason <andri.yngvason@marel.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
linux-can@vger.kernel.org
Subject: Re: [PATCH 2/4] Consolidate and unify state change handling
Date: Wed, 24 Sep 2014 00:31:49 +0200 [thread overview]
Message-ID: <5421F4D5.5030709@hartkopp.net> (raw)
In-Reply-To: <5421D92C.80906@grandegger.com>
On 09/23/2014 10:33 PM, Wolfgang Grandegger wrote:
> On 09/21/2014 07:27 PM, Andri Yngvason wrote:
>> PS.: I must admit that I don't actually know why it's useful to know which
>> error counter changed; tx or rx. I think it would be much simpler to send
>> the max of both and be done with it. Can anyone point out a case where this
>> helps?
>
> I agree that it would be much simpler not to distinguish between rx and
> tx state changes. This is for historical reasons. Oliver, do you
> remember why we adapted that solution?
>
No. Indeed I was not even aware of the fact that error counters should be set
into any kind of relation.
When the error counters change, the error message should be fired.
And when the thresholds e.g. for CAN_ERR_CRTL_*X_WARNING are triggered these
flags should be set accordingly.
So can_state errcount_to_state() makes perfectly sense.
But I don't know why to compare tx error counters to rx error counters either.
Regards,
Oliver
next prev parent reply other threads:[~2014-09-23 22:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 16:25 [PATCH 2/4] Consolidate and unify state change handling Andri Yngvason
2014-09-19 21:10 ` Wolfgang Grandegger
2014-09-21 14:47 ` Andri Yngvason
2014-09-21 15:30 ` Wolfgang Grandegger
2014-09-21 17:27 ` Andri Yngvason
2014-09-23 20:33 ` Wolfgang Grandegger
2014-09-23 22:31 ` Oliver Hartkopp [this message]
2014-09-24 6:28 ` Wolfgang Grandegger
-- strict thread matches above, loose matches on Subject: below --
2014-09-18 16:38 Andri Yngvason
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=5421F4D5.5030709@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=andri.yngvason@marel.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.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 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.