Skip to content

Commit 7c125d5

Browse files
committed
can: grcan: move napi_enable() from under spin lock
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. Acked-by: Vincent Mailhol <[email protected]> Reviewed-by: Francois Romieu <[email protected]> Acked-by: Marc Kleine-Budde <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 6e702e6 commit 7c125d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/can/grcan.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,9 +1073,10 @@ static int grcan_open(struct net_device *dev)
10731073
if (err)
10741074
goto exit_close_candev;
10751075

1076+
napi_enable(&priv->napi);
1077+
10761078
spin_lock_irqsave(&priv->lock, flags);
10771079

1078-
napi_enable(&priv->napi);
10791080
grcan_start(dev);
10801081
if (!(priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY))
10811082
netif_start_queue(dev);

0 commit comments

Comments
 (0)