Commit a00e99c
authored
Revert "wifi: mt76: Disable napi when removing device" (#72)
This reverts commit 8be40d4.
mt7921e_unregister_device() and mt7925e_unregister_device() already
disable every RX NAPI instance before reaching mt76_dma_cleanup(),
which since this commit disables them a second time. napi_disable()
leaves NAPI_STATE_SCHED set on return, so a second call with no
napi_enable() in between waits forever for a bit that nothing will
clear. Module unload hangs in D state, and reboot and poweroff freeze
hard because mt7921_pci_shutdown() and mt7925_pci_shutdown() are
passthroughs to the remove path.
The driver-side loops cannot be dropped instead. They also quiesce RX
NAPI before mt7925_tx_token_put() calls idr_destroy(), which an
in-flight poll can otherwise race through PKT_TYPE_TXRX_NOTIFY and
mt76_token_release(). The equivalent removal upstream was withdrawn by
its author for that race, and the direction agreed there is this
revert plus a local napi_disable() in mt7915's own unregister path,
which can be picked up when it lands.
mt7915 and the other drivers that never disabled RX NAPI before
deleting it regain the unload warnings this commit was written to fix,
until that half arrives.
Link: https://lore.kernel.org/all/CABXGCsO07SExb+Z0PeN6MZ1fKC24Tvn3ehSyeQc-3qFC7jM7dQ@mail.gmail.com/
Signed-off-by: Devin Wittmayer <lucid_duck@justthetip.ca>1 parent c1455af commit a00e99c
1 file changed
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1217 | 1217 | | |
1218 | 1218 | | |
1219 | 1219 | | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
| 1220 | + | |
1224 | 1221 | | |
1225 | 1222 | | |
1226 | 1223 | | |
| |||
0 commit comments