linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: "Max S." <max@schneidersoft.net>
Cc: linux-can <linux-can@vger.kernel.org>
Subject: Re: struct can_bittiming/struct can_berr_counter
Date: Tue, 15 Jan 2013 17:46:14 +0100	[thread overview]
Message-ID: <50F587D6.3080407@grandegger.com> (raw)
In-Reply-To: <50F58688.4050209@grandegger.com>

On 01/15/2013 05:40 PM, Wolfgang Grandegger wrote:
> On 01/12/2013 09:29 PM, Max S. wrote:
>> Hello,
>>
>> What is the reason why struct can_bittiming and struct can_berr_counter
>> use __u32 for all its members?
> 
> I think mainly for user/kernel space alignment and simplicity reasons.
> It has been discussed in an early phase of the project, IIRC.
> 
>> In the case of txerr and rxerr are those not even limited to 255 in the
>> CAN specification?
> 
> I don't have a specication at hand but I have in mind:
> 
>     0  <  error-counter <= 127: error-active state
>   128  <  error-counter <= 255: error-passive state
>   256  <= error-counter       : bus-off

Should be:

    0  <= error-counter <= 127: error-active state
  128  <= error-counter <= 255: error-passive state
  256  <= error-counter       : bus-off

Wolfgang,


      reply	other threads:[~2013-01-15 16:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-29 22:50 max is back Max S.
2013-01-07 19:23 ` Oliver Hartkopp
2013-01-12 20:29   ` struct can_bittiming/struct can_berr_counter Max S.
2013-01-15 16:40     ` Wolfgang Grandegger
2013-01-15 16:46       ` Wolfgang Grandegger [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=50F587D6.3080407@grandegger.com \
    --to=wg@grandegger.com \
    --cc=linux-can@vger.kernel.org \
    --cc=max@schneidersoft.net \
    /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).