lkml.org 
[lkml]   [2018]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/1] can: ucan: add driver for Theobroma Systems UCAN devices
From
Date


Am 14.03.2018 um 10:17 schrieb Wolfgang Grandegger:
>
>
> Am 14.03.2018 um 10:14 schrieb Jakob Unterwurzacher:
>> On 14.03.18 10:11, Wolfgang Grandegger wrote:
>>>> +    /* handle error frames */
>>>> +    canid = le32_to_cpu(m->msg.can_msg.id);
>>>> +    if (canid & CAN_ERR_FLAG) {
>>>> +        ucan_handle_error_frame(up, m, canid);
>>>> +        /* drop frame if berr-reporting is off */
>>>> +        if (!(up->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING))
>>>> +            return;
>>>> +    }
>>>
>>> You still do not generate error messages for state changes, IIUC.
>>
>> The hardware generates error frames on state changes - is that what
>> you mean?
>>
>> In our testing, the state shows up (and updates) correctly in
>>
>>      ip -details -statistics link show can0
>
> Counting the state changes is one thing but you should also generate
> error messages for them.

The usual test here is:

$ candump -td -e any,0:0,#FFFFFFFF

should report proper state changes, if you send messages with

1. no cable connected
2. CAN high and low short-circuited

Also downwards if the hardware error is gone and you continue to send
messages.

Wolfgang.

\
 
 \ /
  Last update: 2018-03-14 10:25    [W:0.073 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site