From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: [RFC] [PATCH v4] can: fix handling of unmodifiable configuration options
Date: Mon, 21 Mar 2016 15:54:22 +0100 [thread overview]
Message-ID: <56F00B1E.5080909@hartkopp.net> (raw)
In-Reply-To: <SG2PR06MB10388D08005F04DAD837A02DC38F0@SG2PR06MB1038.apcprd06.prod.outlook.com>
Hi Ramesh,
thanks for your feedback - also in the other thread with the wrong
subject :-)
Indeed I feel pretty good about this solution:
1. it maintains the current behaviour for CAN2.0 controllers
2. it forces valid combinations for CAN FD
3. it forces the user to think about static ctrlmodes
The only thing I was not sure about when forcing static ctrlmodes to be
set was the fact that you would need to set fd-non-iso for the MCAN
controller setup - even when you only configure it for CAN2.0 traffic:
ip link set can0 type can bitrate 100000 -> ok
ip link set can0 type can bitrate 100000 one-shot on -> fail
ip link set can0 type can bitrate 100000 one-shot on fd-non-iso on -> ok
To be consistent with 'static ctrlmodes have to be provided' it looks
ok. But from a CAN2.0 perspective it looks confusing.
I wonder if it makes sense to handle this *special* case not to force
fd-non-iso when the controller won't get into FD mode. What do you think?
On 03/21/2016 09:37 AM, Ramesh Shanmugasundaram wrote:
>> +static int can_validate(struct nlattr *tb[], struct nlattr *data[]) {
>> + u32 is_can_fd = 0;
>> +
>> + /*
>> + * Make sure that valid CAN FD configurations always consist of
>> + * - nominal/arbitration bittiming
>> + * - data bittiming
>> + * - control mode with CAN_CTRLMODE_FD set
>> + */
>
> This comment style prompts WARNING in latest checkpatch.pl in case you plan to submit in linux-can-next. Otherwise
Ok - I'll fix that in the next version.
> Reviewed-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
I can also add this then.
Btw. I'll wait for feedback about fd-non-iso first.
Best regards,
Oliver
next prev parent reply other threads:[~2016-03-21 14:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-19 8:07 [RFC] [PATCH v4] can: fix handling of unmodifiable configuration options Oliver Hartkopp
2016-03-21 8:37 ` Ramesh Shanmugasundaram
2016-03-21 14:54 ` Oliver Hartkopp [this message]
2016-03-21 15:19 ` Ramesh Shanmugasundaram
2016-03-21 15:25 ` Oliver Hartkopp
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=56F00B1E.5080909@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=ramesh.shanmugasundaram@bp.renesas.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.