]> git.itanic.dy.fi Git - linux-stable/commit
can: kvaser_pciefd: Do not send EFLUSH command on TFD interrupt
authorJimmy Assarsson <extja@kvaser.com>
Tue, 16 May 2023 13:43:17 +0000 (15:43 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 17 May 2023 07:02:40 +0000 (09:02 +0200)
commit262d7a52ba27525e3c1203230c9f0524e48bbb34
tree12ea0a4183144de94e12bf8ef1aa9dcf6bb5b3cb
parentc589557dd1426f5adf90c7a919d4fde5a3e4ef64
can: kvaser_pciefd: Do not send EFLUSH command on TFD interrupt

Under certain circumstances we send two EFLUSH commands, resulting in two
EFLUSH ack packets, while only expecting a single EFLUSH ack.
This can cause the driver Tx flush completion to get out of sync.

To avoid this problem, don't enable the "Transmit buffer flush done" (TFD)
interrupt and remove the code handling it.
Now we only send EFLUSH command after receiving status packet with
"Init detected" (IDET) bit set.

Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices")
Cc: stable@vger.kernel.org
Signed-off-by: Jimmy Assarsson <extja@kvaser.com>
Link: https://lore.kernel.org/r/20230516134318.104279-6-extja@kvaser.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/kvaser_pciefd.c