Skip to content

Commit

Permalink
can: peak_pciefd: pucan_handle_status(): fix a potential starvation i…
Browse files Browse the repository at this point in the history
…ssue in TX path

commit b17233d 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: ffd137f ("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>
  • Loading branch information
Stephane Grosjean authored and gregkh committed Jul 14, 2021
1 parent 78e9986 commit c684508
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/can/peak_canfd/peak_canfd.c
Expand Up @@ -351,8 +351,8 @@ static int pucan_handle_status(struct peak_canfd_priv *priv,
return err;
}

/* start network queue (echo_skb array is empty) */
netif_start_queue(ndev);
/* wake network queue up (echo_skb array is empty) */
netif_wake_queue(ndev);

return 0;
}
Expand Down

0 comments on commit c684508

Please sign in to comment.