All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] can/peak_pciefd: fix a potential issue of sending frames
@ 2021-06-23 14:26 Stephane Grosjean
  2021-06-24  6:35 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: Stephane Grosjean @ 2021-06-23 14:26 UTC (permalink / raw)
  To: linux-can Mailing List; +Cc: Stephane Grosjean

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 <s.grosjean@peak-system.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] can/peak_pciefd: fix a potential issue of sending frames
  2021-06-23 14:26 [PATCH] can/peak_pciefd: fix a potential issue of sending frames Stephane Grosjean
@ 2021-06-24  6:35 ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2021-06-24  6:35 UTC (permalink / raw)
  To: Stephane Grosjean; +Cc: linux-can Mailing List

[-- Attachment #1: Type: text/plain, Size: 794 bytes --]

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 <s.grosjean@peak-system.com>

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 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-24  6:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 14:26 [PATCH] can/peak_pciefd: fix a potential issue of sending frames Stephane Grosjean
2021-06-24  6:35 ` Marc Kleine-Budde

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.