Linux CAN drivers development
 help / color / mirror / Atom feed
From: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	andrew+netdev@lunn.ch, horms@kernel.org, mkl@pengutronix.de,
	linux-can@vger.kernel.org
Subject: Re: [PATCH net-next] can: grcan: move napi_enable() from under spin lock
Date: Sat, 11 Jan 2025 23:20:45 +0900	[thread overview]
Message-ID: <5589a4e2-75b5-49ca-a8bf-5de892cc45c0@wanadoo.fr> (raw)
In-Reply-To: <20250111024742.3680902-1-kuba@kernel.org>

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@kernel.org>

Acked-by: Vincent Mailhol <mailhol.vincent@wanadoo.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@pengutronix.de
> CC: mailhol.vincent@wanadoo.fr
> CC: linux-can@vger.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


  reply	other threads:[~2025-01-11 14:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-11  2:47 [PATCH net-next] can: grcan: move napi_enable() from under spin lock Jakub Kicinski
2025-01-11 14:20 ` Vincent Mailhol [this message]
2025-01-11 18:03 ` Francois Romieu
2025-01-13  9:52 ` Marc Kleine-Budde
2025-01-14  3:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5589a4e2-75b5-49ca-a8bf-5de892cc45c0@wanadoo.fr \
    --to=mailhol.vincent@wanadoo.fr \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox