]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: use __napi_schedule() for PREEMPT_RT
authorSeb Laveze <sebastien.laveze@nxp.com>
Tue, 12 Jan 2021 14:01:22 +0000 (15:01 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Jan 2021 23:50:46 +0000 (15:50 -0800)
commit70408dee8e2d0d76dc9a3d2f13b879fc066df327
tree8668e04d9ac8e703b183f2d70c28bb8a10742291
parentef329e7a13270a8fc8a016ac52e3e9e659403d3c
net: stmmac: use __napi_schedule() for PREEMPT_RT

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 8881d455592d ("enetc: use
napi_schedule to be compatible with PREEMPT_RT")

Signed-off-by: Seb Laveze <sebastien.laveze@nxp.com>
Link: https://lore.kernel.org/r/20210112140121.1487619-1-sebastien.laveze@oss.nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c