* Re: [PATCH] can: kvaser_usb_leaf: Implement CAN 2.0 raw DLC functionality.
[not found] <20230506105529.4023-1-carsten.schmidt-achim@t-online.de>
@ 2023-05-06 19:10 ` Oliver Hartkopp
2023-05-08 16:40 ` Jimmy Assarsson
0 siblings, 1 reply; 4+ messages in thread
From: Oliver Hartkopp @ 2023-05-06 19:10 UTC (permalink / raw)
To: Jimmy Assarsson, Carsten Schmidt
Cc: Marc Kleine-Budde, Vincent Mailhol, linux-can
Thanks for your patch Carsten!
There should be at least one sentence in the commit message even when
the subject almost covers the story ;-)
Can you also please change the subject to
can: kvaser_usb: add len8_dlc support for kvaser_usb_leaf
to follow up with the other len8_dlc patches?
@Jimmy: AFAIK Carsten only has a Kvaser USB Leaf for testing. Can you
probably provide and test a similar improvement for the Kvaser USB Hydra
hardware?
Many thanks,
Oliver
On 06.05.23 12:55, Carsten Schmidt wrote:
> Signed-off-by: Carsten Schmidt <carsten.schmidt-achim@t-online.de>
> ---
> drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
> index 1c2f99ce4c6c..713b633773b1 100644
> --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
> +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
> @@ -573,7 +573,7 @@ kvaser_usb_leaf_frame_to_cmd(const struct kvaser_usb_net_priv *priv,
> cmd->u.tx_can.data[1] = cf->can_id & 0x3f;
> }
>
> - cmd->u.tx_can.data[5] = cf->len;
> + cmd->u.tx_can.data[5] = can_get_cc_dlc(cf, priv->can.ctrlmode);
> memcpy(&cmd->u.tx_can.data[6], cf->data, cf->len);
>
> if (cf->can_id & CAN_RTR_FLAG)
> @@ -1349,7 +1349,7 @@ static void kvaser_usb_leaf_rx_can_msg(const struct kvaser_usb *dev,
> else
> cf->can_id &= CAN_SFF_MASK;
>
> - cf->len = can_cc_dlc2len(cmd->u.leaf.log_message.dlc);
> + can_frame_set_cc_len(cf, cmd->u.leaf.log_message.dlc & 0xF, priv->can.ctrlmode);
>
> if (cmd->u.leaf.log_message.flags & MSG_FLAG_REMOTE_FRAME)
> cf->can_id |= CAN_RTR_FLAG;
> @@ -1367,7 +1367,7 @@ static void kvaser_usb_leaf_rx_can_msg(const struct kvaser_usb *dev,
> cf->can_id |= CAN_EFF_FLAG;
> }
>
> - cf->len = can_cc_dlc2len(rx_data[5]);
> + can_frame_set_cc_len(cf, rx_data[5] & 0xF, priv->can.ctrlmode);
>
> if (cmd->u.rx_can_header.flag & MSG_FLAG_REMOTE_FRAME)
> cf->can_id |= CAN_RTR_FLAG;
> @@ -1702,6 +1702,7 @@ static int kvaser_usb_leaf_init_card(struct kvaser_usb *dev)
> struct kvaser_usb_dev_card_data *card_data = &dev->card_data;
>
> card_data->ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES;
> + card_data->ctrlmode_supported |= CAN_CTRLMODE_CC_LEN8_DLC;
>
> return 0;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] can: kvaser_usb_leaf: Implement CAN 2.0 raw DLC functionality.
2023-05-06 19:10 ` [PATCH] can: kvaser_usb_leaf: Implement CAN 2.0 raw DLC functionality Oliver Hartkopp
@ 2023-05-08 16:40 ` Jimmy Assarsson
2023-05-11 15:42 ` Jimmy Assarsson
0 siblings, 1 reply; 4+ messages in thread
From: Jimmy Assarsson @ 2023-05-08 16:40 UTC (permalink / raw)
To: Oliver Hartkopp, Carsten Schmidt
Cc: Marc Kleine-Budde, Vincent Mailhol, linux-can
Hi Carsten,
Hi Oliver,
On 5/6/23 21:10, Oliver Hartkopp wrote:
> Thanks for your patch Carsten!
>
> There should be at least one sentence in the commit message even when
> the subject almost covers the story ;-)
@Carsten, thanks for the patch!
Acked-by: Jimmy Assarsson <extja@kvaser.com>
Tested-by: Jimmy Assarsson <extja@kvaser.com>
> Can you also please change the subject to
>
> can: kvaser_usb: add len8_dlc support for kvaser_usb_leaf
>
> to follow up with the other len8_dlc patches?
>
> @Jimmy: AFAIK Carsten only has a Kvaser USB Leaf for testing. Can you
> probably provide and test a similar improvement for the Kvaser USB Hydra
> hardware?
@Oliver, yes, I'll fix this for the remaining Kvaser USB devices.
I'll try to send a patch for it by the end of the week.
Best regards,
jimmy
> Many thanks,
> Oliver
>
> On 06.05.23 12:55, Carsten Schmidt wrote:
>> Signed-off-by: Carsten Schmidt <carsten.schmidt-achim@t-online.de>
>> ---
>> drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 7 ++++---
>> 1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
>> b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
>> index 1c2f99ce4c6c..713b633773b1 100644
>> --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
>> +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
>> @@ -573,7 +573,7 @@ kvaser_usb_leaf_frame_to_cmd(const struct
>> kvaser_usb_net_priv *priv,
>> cmd->u.tx_can.data[1] = cf->can_id & 0x3f;
>> }
>> - cmd->u.tx_can.data[5] = cf->len;
>> + cmd->u.tx_can.data[5] = can_get_cc_dlc(cf, priv->can.ctrlmode);
>> memcpy(&cmd->u.tx_can.data[6], cf->data, cf->len);
>> if (cf->can_id & CAN_RTR_FLAG)
>> @@ -1349,7 +1349,7 @@ static void kvaser_usb_leaf_rx_can_msg(const
>> struct kvaser_usb *dev,
>> else
>> cf->can_id &= CAN_SFF_MASK;
>> - cf->len = can_cc_dlc2len(cmd->u.leaf.log_message.dlc);
>> + can_frame_set_cc_len(cf, cmd->u.leaf.log_message.dlc & 0xF,
>> priv->can.ctrlmode);
>> if (cmd->u.leaf.log_message.flags & MSG_FLAG_REMOTE_FRAME)
>> cf->can_id |= CAN_RTR_FLAG;
>> @@ -1367,7 +1367,7 @@ static void kvaser_usb_leaf_rx_can_msg(const
>> struct kvaser_usb *dev,
>> cf->can_id |= CAN_EFF_FLAG;
>> }
>> - cf->len = can_cc_dlc2len(rx_data[5]);
>> + can_frame_set_cc_len(cf, rx_data[5] & 0xF, priv->can.ctrlmode);
>> if (cmd->u.rx_can_header.flag & MSG_FLAG_REMOTE_FRAME)
>> cf->can_id |= CAN_RTR_FLAG;
>> @@ -1702,6 +1702,7 @@ static int kvaser_usb_leaf_init_card(struct
>> kvaser_usb *dev)
>> struct kvaser_usb_dev_card_data *card_data = &dev->card_data;
>> card_data->ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES;
>> + card_data->ctrlmode_supported |= CAN_CTRLMODE_CC_LEN8_DLC;
>> return 0;
>> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] can: kvaser_usb_leaf: Implement CAN 2.0 raw DLC functionality.
2023-05-08 16:40 ` Jimmy Assarsson
@ 2023-05-11 15:42 ` Jimmy Assarsson
[not found] ` <645E8D12.5060901@t-online.de>
0 siblings, 1 reply; 4+ messages in thread
From: Jimmy Assarsson @ 2023-05-11 15:42 UTC (permalink / raw)
To: Carsten Schmidt
Cc: Oliver Hartkopp, Marc Kleine-Budde, Vincent Mailhol, linux-can
On 2023-05-08 18:40, Jimmy Assarsson wrote:
> Hi Carsten,
> Hi Oliver,
>
> On 5/6/23 21:10, Oliver Hartkopp wrote:
>> Thanks for your patch Carsten!
>>
>> There should be at least one sentence in the commit message even when the
>> subject almost covers the story ;-)
>
> @Carsten, thanks for the patch!
>
> Acked-by: Jimmy Assarsson <extja@kvaser.com>
> Tested-by: Jimmy Assarsson <extja@kvaser.com>
>
>> Can you also please change the subject to
>>
>> can: kvaser_usb: add len8_dlc support for kvaser_usb_leaf
>>
>> to follow up with the other len8_dlc patches?
>>
>> @Jimmy: AFAIK Carsten only has a Kvaser USB Leaf for testing. Can you
>> probably provide and test a similar improvement for the Kvaser USB Hydra
>> hardware?
>
>
> @Oliver, yes, I'll fix this for the remaining Kvaser USB devices.
> I'll try to send a patch for it by the end of the week.
>
> Best regards,
> jimmy
Hi Carsten,
I've implemented cc-len8-dlc support for the Kvaser USB Hydra devices.
Is it OK if I add my changes to your patch, and send it is as a V2?
Best regards,
jimmy
>> Many thanks,
>> Oliver
>>
>> On 06.05.23 12:55, Carsten Schmidt wrote:
>>> Signed-off-by: Carsten Schmidt <carsten.schmidt-achim@t-online.de>
>>> ---
>>> drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 7 ++++---
>>> 1 file changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
>>> b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
>>> index 1c2f99ce4c6c..713b633773b1 100644
>>> --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
>>> +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
>>> @@ -573,7 +573,7 @@ kvaser_usb_leaf_frame_to_cmd(const struct
>>> kvaser_usb_net_priv *priv,
>>> cmd->u.tx_can.data[1] = cf->can_id & 0x3f;
>>> }
>>> - cmd->u.tx_can.data[5] = cf->len;
>>> + cmd->u.tx_can.data[5] = can_get_cc_dlc(cf, priv->can.ctrlmode);
>>> memcpy(&cmd->u.tx_can.data[6], cf->data, cf->len);
>>> if (cf->can_id & CAN_RTR_FLAG)
>>> @@ -1349,7 +1349,7 @@ static void kvaser_usb_leaf_rx_can_msg(const
>>> struct kvaser_usb *dev,
>>> else
>>> cf->can_id &= CAN_SFF_MASK;
>>> - cf->len = can_cc_dlc2len(cmd->u.leaf.log_message.dlc);
>>> + can_frame_set_cc_len(cf, cmd->u.leaf.log_message.dlc & 0xF,
>>> priv->can.ctrlmode);
>>> if (cmd->u.leaf.log_message.flags & MSG_FLAG_REMOTE_FRAME)
>>> cf->can_id |= CAN_RTR_FLAG;
>>> @@ -1367,7 +1367,7 @@ static void kvaser_usb_leaf_rx_can_msg(const
>>> struct kvaser_usb *dev,
>>> cf->can_id |= CAN_EFF_FLAG;
>>> }
>>> - cf->len = can_cc_dlc2len(rx_data[5]);
>>> + can_frame_set_cc_len(cf, rx_data[5] & 0xF, priv->can.ctrlmode);
>>> if (cmd->u.rx_can_header.flag & MSG_FLAG_REMOTE_FRAME)
>>> cf->can_id |= CAN_RTR_FLAG;
>>> @@ -1702,6 +1702,7 @@ static int kvaser_usb_leaf_init_card(struct
>>> kvaser_usb *dev)
>>> struct kvaser_usb_dev_card_data *card_data = &dev->card_data;
>>> card_data->ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES;
>>> + card_data->ctrlmode_supported |= CAN_CTRLMODE_CC_LEN8_DLC;
>>> return 0;
>>> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] can: kvaser_usb_leaf: Implement CAN 2.0 raw DLC functionality.
[not found] ` <645E8D12.5060901@t-online.de>
@ 2023-05-16 13:00 ` Jimmy Assarsson
0 siblings, 0 replies; 4+ messages in thread
From: Jimmy Assarsson @ 2023-05-16 13:00 UTC (permalink / raw)
To: Carsten Schmidt
Cc: Oliver Hartkopp, Marc Kleine-Budde, Vincent Mailhol, linux-can
On 5/12/23 21:01, Carsten Schmidt wrote:
> Hello Jimmy,
Hi Carsten,
> yes, please do make a v2 patch!
Now I've sent an updated patch:
https://lore.kernel.org/linux-can/20230516125332.82894-1-extja@kvaser.com
> As this is my first patch, I am very thankful for any support to get
> the work into the main kernel! Thank you!
Ahh, nice :)
And again, thanks for this patch!
Best regards,
jimmy
> @Oliver: Thanx for the encouragement and guidance with the patch!
>
> Sincerely,
> Carsten
>
>
>
> Am 11.05.2023 um 17:42 schrieb Jimmy Assarsson:
>> On 2023-05-08 18:40, Jimmy Assarsson wrote:
>>> Hi Carsten,
>>> Hi Oliver,
>>>
>>> On 5/6/23 21:10, Oliver Hartkopp wrote:
>>>> Thanks for your patch Carsten!
>>>>
>>>> There should be at least one sentence in the commit message even when
>>>> the subject almost covers the story ;-)
>>>
>>> @Carsten, thanks for the patch!
>>>
>>> Acked-by: Jimmy Assarsson <extja@kvaser.com>
>>> Tested-by: Jimmy Assarsson <extja@kvaser.com>
>>>
>>>> Can you also please change the subject to
>>>>
>>>> can: kvaser_usb: add len8_dlc support for kvaser_usb_leaf
>>>>
>>>> to follow up with the other len8_dlc patches?
>>>>
>>>> @Jimmy: AFAIK Carsten only has a Kvaser USB Leaf for testing. Can you
>>>> probably provide and test a similar improvement for the Kvaser USB
>>>> Hydra hardware?
>>>
>>>
>>> @Oliver, yes, I'll fix this for the remaining Kvaser USB devices.
>>> I'll try to send a patch for it by the end of the week.
>>>
>>> Best regards,
>>> jimmy
>>
>> Hi Carsten,
>>
>> I've implemented cc-len8-dlc support for the Kvaser USB Hydra devices.
>> Is it OK if I add my changes to your patch, and send it is as a V2?
>>
>> Best regards,
>> jimmy
>>
>>>> Many thanks,
>>>> Oliver
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-16 13:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20230506105529.4023-1-carsten.schmidt-achim@t-online.de>
2023-05-06 19:10 ` [PATCH] can: kvaser_usb_leaf: Implement CAN 2.0 raw DLC functionality Oliver Hartkopp
2023-05-08 16:40 ` Jimmy Assarsson
2023-05-11 15:42 ` Jimmy Assarsson
[not found] ` <645E8D12.5060901@t-online.de>
2023-05-16 13:00 ` Jimmy Assarsson
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).