Skip to content

Commit 65accf0

Browse files
sl8vzgregkh
authored andcommitted
net: stmmac: use __napi_schedule() for PREEMPT_RT
[ Upstream commit 1f02efd ] Use of __napi_schedule_irqoff() is not safe with PREEMPT_RT in which hard interrupts are not disabled while running the threaded interrupt. Using __napi_schedule() works for both PREEMPT_RT and mainline Linux, just at the cost of an additional check if interrupts are disabled for mainline (since they are already disabled). Similar to the fix done for enetc commit 215602a ("enetc: use napi_schedule to be compatible with PREEMPT_RT") Signed-off-by: Seb Laveze <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6f3fe96 commit 65accf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2158,7 +2158,7 @@ static int stmmac_napi_check(struct stmmac_priv *priv, u32 chan)
21582158
spin_lock_irqsave(&ch->lock, flags);
21592159
stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 0);
21602160
spin_unlock_irqrestore(&ch->lock, flags);
2161-
__napi_schedule_irqoff(&ch->rx_napi);
2161+
__napi_schedule(&ch->rx_napi);
21622162
}
21632163
}
21642164

@@ -2167,7 +2167,7 @@ static int stmmac_napi_check(struct stmmac_priv *priv, u32 chan)
21672167
spin_lock_irqsave(&ch->lock, flags);
21682168
stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 0, 1);
21692169
spin_unlock_irqrestore(&ch->lock, flags);
2170-
__napi_schedule_irqoff(&ch->tx_napi);
2170+
__napi_schedule(&ch->tx_napi);
21712171
}
21722172
}
21732173

0 commit comments

Comments
 (0)