mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: move napi_enable() from under BH
mt76 does a lot of:
local_bh_disable();
napi_enable(...napi);
napi_schedule(...napi);
local_bh_enable();
local_bh_disable() is not a real lock, its most likely taken
because napi_schedule() requires that we invoke softirqs at
some point. napi_enable() needs to take a mutex, so move it
from under the BH protection.
Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
Reported-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/[email protected]
Reviewed-by: Eric Dumazet <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
a4be3fc9ed
commit
0ba7a69f89
+6
-2
@@ -164,12 +164,16 @@ static int mt7615_pci_resume(struct pci_dev *pdev)
|
||||
dev_err(mdev->dev, "PDMA engine must be reinitialized\n");
|
||||
|
||||
mt76_worker_enable(&mdev->tx_worker);
|
||||
local_bh_disable();
|
||||
|
||||
mt76_for_each_q_rx(mdev, i) {
|
||||
napi_enable(&mdev->napi[i]);
|
||||
napi_schedule(&mdev->napi[i]);
|
||||
}
|
||||
napi_enable(&mdev->tx_napi);
|
||||
|
||||
local_bh_disable();
|
||||
mt76_for_each_q_rx(mdev, i) {
|
||||
napi_schedule(&mdev->napi[i]);
|
||||
}
|
||||
napi_schedule(&mdev->tx_napi);
|
||||
local_bh_enable();
|
||||
|
||||
|
||||
+5
-3
@@ -262,12 +262,14 @@ void mt7615_mac_reset_work(struct work_struct *work)
|
||||
|
||||
mt76_worker_enable(&dev->mt76.tx_worker);
|
||||
|
||||
local_bh_disable();
|
||||
napi_enable(&dev->mt76.tx_napi);
|
||||
napi_schedule(&dev->mt76.tx_napi);
|
||||
|
||||
mt76_for_each_q_rx(&dev->mt76, i) {
|
||||
napi_enable(&dev->mt76.napi[i]);
|
||||
}
|
||||
|
||||
local_bh_disable();
|
||||
napi_schedule(&dev->mt76.tx_napi);
|
||||
mt76_for_each_q_rx(&dev->mt76, i) {
|
||||
napi_schedule(&dev->mt76.napi[i]);
|
||||
}
|
||||
local_bh_enable();
|
||||
|
||||
Reference in New Issue
Block a user