Re: [PATCH] can: don't count arbitration lose as an error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux