[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5589a4e2-75b5-49ca-a8bf-5de892cc45c0@wanadoo.fr>
Date: Sat, 11 Jan 2025 23:20:45 +0900
From: Vincent Mailhol <mailhol.vincent@...adoo.fr>
To: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc: netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
andrew+netdev@...n.ch, horms@...nel.org, mkl@...gutronix.de,
linux-can@...r.kernel.org
Subject: Re: [PATCH net-next] can: grcan: move napi_enable() from under spin
lock
On 11/01/2025 at 11:47, Jakub Kicinski wrote:
> I don't see any reason why napi_enable() needs to be under the lock,
> only reason I could think of is if the IRQ also took this lock
> but it doesn't. napi_enable() will soon need to sleep.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Acked-by: Vincent Mailhol <mailhol.vincent@...adoo.fr>
> ---
> Marc, if this is correct is it okay for me to take via net-next
> directly? I have a bunch of patches which depend on it.
Even if the question is not addressed to me, I am personally fine if
this directly goes into net-next.
> CC: mkl@...gutronix.de
> CC: mailhol.vincent@...adoo.fr
> CC: linux-can@...r.kernel.org
> ---
> drivers/net/can/grcan.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c
> index cdf0ec9fa7f3..21a61b86f67d 100644
> --- a/drivers/net/can/grcan.c
> +++ b/drivers/net/can/grcan.c
> @@ -1073,9 +1073,10 @@ static int grcan_open(struct net_device *dev)
> if (err)
> goto exit_close_candev;
>
> + napi_enable(&priv->napi);
> +
> spin_lock_irqsave(&priv->lock, flags);
>
> - napi_enable(&priv->napi);
> grcan_start(dev);
> if (!(priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY))
> netif_start_queue(dev);
Yours sincerely,
Vincent Mailhol
Powered by blists - more mailing lists