]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:36:54 +0000 (17:36 +0100)
commit143623940a03e0dff3911fc03a4e18d85ee10f36
treeb53b18ab7279f56cdb838977fd3f6bfcdd63c437
parentc724a6edc1c69b47fe5881932e8402805f819296
can: kvaser_pciefd: Do not send EFLUSH command on TFD interrupt

commit 262d7a52ba27525e3c1203230c9f0524e48bbb34 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/kvaser_pciefd.c