[PATCH] can/peak_pciefd: fix a potential issue of sending frames

Subsystems: can network drivers, the rest

STALE1912d LANDED

Landed in mainline as b17233d385d0 on 2021-06-24.

2 messages, 2 authors, 2021-06-24 · open the first message on its own page

[PATCH] can/peak_pciefd: fix a potential issue of sending frames

From: Stephane Grosjean <hidden>
Date: 2021-06-23 14:28:05

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.

Signed-off-by: Stephane Grosjean <redacted>
---
 drivers/net/can/peak_canfd/peak_canfd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/peak_canfd/peak_canfd.c b/drivers/net/can/peak_canfd/peak_canfd.c
index 00847cbaf7b6..d08718e98e11 100644
--- a/drivers/net/can/peak_canfd/peak_canfd.c
+++ b/drivers/net/can/peak_canfd/peak_canfd.c
@@ -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;
 	}
-- 
2.25.1

Re: [PATCH] can/peak_pciefd: fix a potential issue of sending frames

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2021-06-24 06:35:14

On 23.06.2021 16:26:00, Stephane Grosjean wrote:
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.

Signed-off-by: Stephane Grosjean <redacted>
Applied to linux-can/testing

Added stable on Cc.

regards,
Marc
-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help