]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 24 Jun 2021 06:40:10 +0000 (08:40 +0200)
commit1d84b86aa701743dfd09172aab3fceeb6be55949
tree4ab5c96b83a3cb6604d01daaf2d5dc74e69e70b3
parentcd6fc2d6fdd30d418aa66f0c4d7413bbb5c1f7a9
can: peak_pciefd: pucan_handle_status(): fix a potential starvation issue in TX path

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: d210c81f2dae ("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>
drivers/net/can/peak_canfd/peak_canfd.c