> -----Original Message----- > From: Oliver Hartkopp [mailto:socketcan@xxxxxxxxxxxx] > Sent: Wednesday, August 1, 2018 11:34 PM > To: Pankaj Bansal <pankaj.bansal@xxxxxxx>; linux-can@xxxxxxxxxxxxxxx; > mkl@xxxxxxxxxxxxxx > Subject: Re: [RFC] net: can: flexcan: can FD Format (FDF) changes > > On 07/31/2018 07:18 PM, Pankaj Bansal wrote: > > > @@ -563,6 +612,12 @@ static netdev_tx_t flexcan_start_xmit(struct > > sk_buff *skb, struct net_device *de > > > > if (cf->can_id & CAN_RTR_FLAG) > > ctrl |= FLEXCAN_MB_CNT_RTR; > > + if (priv->can.ctrlmode & CAN_CTRLMODE_FD) > > + ctrl |= FLEXCAN_MB_CNT_EDL; > > This looks completely wrong. > > Whether the CAN frame in the skb is a CAN or CAN FD frame type must be > derived from the skb->len ( which can be CAN_MTU or CANFD_MTU ). > > I think you meant: > > if (can_is_canfd_skb(skb)) > ctrl |= FLEXCAN_MB_CNT_EDL; > > Right? Right, I have taken care of this in PATCH v3. I am checking the type of SKB now in xmit function. In the patch V1 of this FD format changes, I am setting the EDL bit in "if (can_is_canfd_skb(skb))" block. I will send the v1 for this RFC patch right away. > > With "if (priv->can.ctrlmode & CAN_CTRLMODE_FD)" you would ALWAYS > send only CAN FD frames. But CAN_CTRLMODE_FD means, that the > controller is enabled to handle CAN2.0 _and_ CAN FD frames - and not CAN > FD only. > > Regards, > Oliver ��.n��������+%������w��{.n�����{����*jg��������ݢj����G�������j:+v���w�m������w�������h�����٥