diff options
author | Jeroen Hofstee <jhofstee@victronenergy.com> | 2020-11-27 10:59:38 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-16 10:58:28 +0100 |
commit | 50982ba118e4cd961ae1d0bfaa16a2b5032614f2 (patch) | |
tree | 7e6b2d72db5e19619150ee0a591c8ca1149d2fe6 /drivers/net | |
parent | 89a9f7dd637bf7acee6879d62221cbc68a98aafb (diff) | |
download | linux-stable-50982ba118e4cd961ae1d0bfaa16a2b5032614f2.tar.gz linux-stable-50982ba118e4cd961ae1d0bfaa16a2b5032614f2.tar.bz2 linux-stable-50982ba118e4cd961ae1d0bfaa16a2b5032614f2.zip |
can: sun4i_can: sun4i_can_err(): don't count arbitration lose as an error
[ Upstream commit c2d095eff797813461a426b97242e3ffc50e4134 ]
Losing arbitration is normal in a CAN-bus network, it means that a higher
priority frame is being send and the pending message will be retried later.
Hence most driver only increment arbitration_lost, but the sun4i driver also
incremeants tx_error, causing errors to be reported on a normal functioning
CAN-bus. So stop counting them as errors.
Fixes: 0738eff14d81 ("can: Allwinner A10/A20 CAN Controller support - Kernel module")
Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com>
Link: https://lore.kernel.org/r/20201127095941.21609-1-jhofstee@victronenergy.com
[mkl: split into two seperate patches]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/can/sun4i_can.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/can/sun4i_can.c b/drivers/net/can/sun4i_can.c index e2c6cf4b2228..b3f2f4fe5ee0 100644 --- a/drivers/net/can/sun4i_can.c +++ b/drivers/net/can/sun4i_can.c @@ -604,7 +604,6 @@ static int sun4i_can_err(struct net_device *dev, u8 isrc, u8 status) netdev_dbg(dev, "arbitration lost interrupt\n"); alc = readl(priv->base + SUN4I_REG_STA_ADDR); priv->can.can_stats.arbitration_lost++; - stats->tx_errors++; if (likely(skb)) { cf->can_id |= CAN_ERR_LOSTARB; cf->data[0] = (alc >> 8) & 0x1f; |