RE: [PATCH v2] can: rcar_canfd: Add Renesas R-Car CAN FD driver

Ramesh Shanmugasundaram
2016-03-11T07:14:43Z

Hi Oliver, Marc,

> On 03/08/2016 01:48 PM, Ramesh Shanmugasundaram wrote:
>
> >> In fact you provided a CAN driver which is "CAN-FD-only".
> >
> > Yes. That's the status of current submission.

(...)

> >
> > I did try this option earlier but there are two problems with this
> method.
> >
> > 1) Below configuration is not possible
> >
> > ip link set can0 up type can bitrate 1000000 dbitrate 1000000 fd on
> >
> > "fd on" -> This is not allowed because CAN_CTRLMODE_FD bit is not set in
> ctrlmode_supported.
> >
> > 2) If I ignore "fd on", my interface MTU stays as CAN_MTU only. If I
> have to change the MTU alone to CANFD_MTU using another netlink message,
> it again checks ctrlmode_supported where it would fail. I have the option
> of providing my own change_mtu function & ignore this check but two
> configuration messages are required for my driver alone :-(.
> >
> > Both these anomalies are addressed with the current check I have.
>
> Oh - you are right with complaining about this inconsistency.
>
> Can you check my RFC patch for Linux stable I just sent on the mailing
> list?
> http://marc.info/?l=linux-can&m=145745724917976&w=2

As we are fixing this issue in CAN dev.c, I'll remove this check in ndo_open and set CAN_CTRLMODE_FD flag in ctrlmode & remove the flag in ctrlmode_supported in the next v3 version of the patch.

Are there any further comments on v2 patch please?

Thanks,
Ramesh