Skip to content

Commit a00e99c

Browse files
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

File tree

dma.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,10 +1217,7 @@ void mt76_dma_cleanup(struct mt76_dev *dev)
12171217
mt76_for_each_q_rx(dev, i) {
12181218
struct mt76_queue *q = &dev->q_rx[i];
12191219

1220-
if (!mt76_queue_is_wed_rro(q)) {
1221-
napi_disable(&dev->napi[i]);
1222-
netif_napi_del(&dev->napi[i]);
1223-
}
1220+
netif_napi_del(&dev->napi[i]);
12241221
mt76_dma_rx_cleanup(dev, q);
12251222

12261223
page_pool_destroy(q->page_pool);

0 commit comments

Comments
 (0)