can: peak_pciefd: pucan_handle_status(): fix a potential starvation issue in TX path
authorStephane Grosjean <s.grosjean@peak-system.com>
Wed, 23 Jun 2021 14:26:00 +0000 (16:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:55:41 +0000 (16:55 +0200)
commit507925fff036e0ddc3de406639b73e7ddc4a7e8b
tree99cc567083c4feaf0e0873f126321ee78f50a756
parentf79ea4755f6bac95b8df24ca9a7df1707e72aa27
can: peak_pciefd: pucan_handle_status(): fix a potential starvation issue in TX path

commit b17233d385d0b6b43ecf81d43008cb1bbb008166 upstream.

Rather than just indicating that transmission can start, this patch
requires the explicit flushing of the network TX queue when the driver
is informed by the device that it can transmit, next to its
configuration.

In this way, if frames have already been written by the application,
they will actually be transmitted.

Fixes: ffd137f7043c ("can: peak/pcie_fd: remove useless code when interface starts")
Link: https://lore.kernel.org/r/20210623142600.149904-1-s.grosjean@peak-system.com
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/peak_canfd/peak_canfd.c