[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b08226a0-bd96-637f-954d-fb8dedc0017b@hartkopp.net>
Date: Wed, 2 Dec 2020 17:22:56 +0100
From: Oliver Hartkopp <socketcan@...tkopp.net>
To: Jeroen Hofstee <jhofstee@...tronenergy.com>,
Marc Kleine-Budde <mkl@...gutronix.de>,
linux-can@...r.kernel.org
Cc: Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...l.net>,
"open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
"moderated list:ARM/Allwinner sunXi SoC support"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] can: don't count arbitration lose as an error
Hello Jeroen,
On 02.12.20 16:37, Jeroen Hofstee wrote:
> On 12/2/20 3:35 PM, Oliver Hartkopp wrote:
>> Do we agree that in one-shot mode both the tx_errors and the
>> arbitration_lost counters are increased in the arbitration-lost case?
>>
>> At least this would fit to the Kvaser USB behaviour.
>
>
> I have no opinion about that. I just kept existing behavior.
That's ok for me either.
>> And btw. I wondered if we should remove the check for
>> CAN_CTRLMODE_ONE_SHOT here, as we ALWAYS should count a tx_error and
>> drop the echo_skb when we have a TX-interrupt and TX-complete flag is
>> zero.
>>
>> So replace:
>>
>> if (priv->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT &&
>> !(status & SR_TCS)) {
>>
>> with:
>>
>> if (!(status & SR_TCS)) {
>>
>> Any suggestions?
>>
>
> In theory, yes. But I can't think of a reason you would end
> up there without CAN_CTRLMODE_ONE_SHOT being set.
Right. Me too. But for that reason I would remove that extra check to
catch this error even if CAN_CTRLMODE_ONE_SHOT is not enabled.
> Aborting the current transmission in non single shot mode
> will get you there and incorrectly report the message as
> transmitted, but that is not implemented afaik.
Ahem, no. If you get there the echo_skb is deleted and the tx_errors
counter is increased. Just as it should be.
Regards,
Oliver
Powered by blists - more mailing lists