From: Ben Greear <greearb@candelatech.com>
To: Devin Wittmayer <lucid_duck@justthetip.ca>
Cc: linux-wireless@vger.kernel.org,
linux-mediatek@lists.infradead.org, nbd@nbd.name,
lorenzo@kernel.org, Shiji Yang <yangshiji66@outlook.com>
Subject: Re: [RFC 1/2] wifi: mt76: disable NAPI before deleting in dma_cleanup
Date: Sun, 20 Sep 2026 07:49:38 -0700 [thread overview]
Message-ID: <599b4d0d-31fa-4466-bfdc-8185d6c0ee5d@candelatech.com> (raw)
In-Reply-To: <20260920034907.199687-1-lucid_duck@justthetip.ca>
On 9/19/26 20:49, Devin Wittmayer wrote:
> On 9/16/26 13:47, Ben Greear wrote:
>> + napi_disable(&dev->napi[i]);
>> netif_napi_del(&dev->napi[i]);
>
> Ben,
>
> The warning and the softirqd spin are both real, and your 2/2 looks like
> the right place for them.
>
> On 1/2 there is a snag. mt7921e and mt7925e already stop RX themselves,
> and they do it early:
>
> mt76_unregister_device()
> napi_disable() on each rx queue
> tx_token_put()
> mt792x_dma_cleanup()
>
> It has to be early. A poll still in flight can come back with a transmit
> status and take an entry out of the table tx_token_put() is tearing
> down. By the time the shared cleanup runs RX is already stopped, so a
> second disable there just sits:
>
> task in D state, refcount -1
> napi_disable_locked <- mt76_dma_cleanup <- mt7925_pci_remove
>
> That was on MT7927. The USB parts tear down a different way and never
> arrive, which is probably why this is easy to miss.
>
> Would putting the disable next to the IRQ and tasklet work in your 2/2
> cover mt7996? That keeps it where the driver already knows whether it
> has stopped RX.
I have a hard time figuring out exactly how to safely tear down
the mt7996 driver, especially without breaking other mt76 drivers.
But instead of just playing whack-a-mole with this,
we should figure out if sub-driver or mt76 core should be handling this,
and add some comments of expected behaviour so we don't keep fixing one chipset
and breaking another.
Maybe Felix has an opinion on correct path forward?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
prev parent reply other threads:[~2026-09-20 14:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260916204750.1439984-1-greearb@candelatech.com>
2026-09-20 3:49 ` [RFC 1/2] wifi: mt76: disable NAPI before deleting in dma_cleanup Devin Wittmayer
2026-09-20 14:49 ` Ben Greear [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=599b4d0d-31fa-4466-bfdc-8185d6c0ee5d@candelatech.com \
--to=greearb@candelatech.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=lucid_duck@justthetip.ca \
--cc=nbd@nbd.name \
--cc=yangshiji66@outlook.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox