Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Luka Gejak" <luka.gejak@linux.dev>
To: "Alastair D'Silva" <alastair@d-silva.org>,
	linux-wireless@vger.kernel.org,
	"Ping-Ke Shih" <pkshih@realtek.com>,
	"Kalle Valo" <kvalo@kernel.org>
Cc: "Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Ulf Hansson" <ulfh@kernel.org>,
	linux-kernel@vger.kernel.org,
	"Alastair D'Silva" <alastair@d-silva.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH rtw-next v6 2/4] wifi: rtw88: sdio: Track running state and cancel TX worker on stop
Date: Wed, 14 Oct 2026 09:12:59 +0000	[thread overview]
Message-ID: <602ff65a1384f1649c49dcab2d17975e17c29d7c@linux.dev> (raw)
In-Reply-To: <20261014074426.2183095-3-alastair@d-silva.org>

Hi Alastair,

October 14, 2026 at 9:44 AM, "Alastair D'Silva" <alastair@d-silva.org> wrote:

>  static void rtw_sdio_stop(struct rtw_dev *rtwdev)
>  {                                                                                            > -     rtw_sdio_disable_interrupt(rtwdev);
> +     struct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;                             > +
> +     sdio_claim_host(rtwsdio->sdio_func);
> +     scoped_guard(mutex, &rtwsdio->irq_lock) {
> +             rtwsdio->running = false;
> +             rtw_sdio_disable_interrupt(rtwdev);
> +     }
> +     sdio_release_host(rtwsdio->sdio_func);
> +
> +     cancel_delayed_work_sync(&rtwsdio->tx_handler_data->work);
>  }

One thing about that cancel. The delayed work is the back pressure retry:
rtw_sdio_8723bs_reschedule_tx() re-arms it with queue_delayed_work() when
a page shortage parks a frame, and rtw_sdio_tx_kick_off() re-arms it with
mod_delayed_work() for every new frame. On 8723bs the frames that fill the
software FIFO past the watermark also stop the matching mac80211 queue
(ieee80211_stop_queue() in rtw_sdio_8723bs_stop_tx_queue()), and
rtw_sdio_start() undoes neither that nor tx_queue_stopped[]. The flag is
cleared in rtw_sdio_init_tx() and in rtw_sdio_8723bs_wake_tx_queue(), and
the second of those only runs after a write has gone out.

So a stop that lands while an access category is held back leaves the
queue stopped and its frames parked in rtwsdio->tx_queue[] with no work
queued to come back for them. It recovers as soon as anything transmits
on any queue, because that kicks the worker again and the handler walks
all queues, so I could not make it a permanent wedge. It does mean an
idle link can sit on those frames for a long time. Would it be worth
re-arming the worker at the end of rtw_sdio_start(), or clearing
tx_queue_stopped[] and waking the queues there?

Best regards,
Luka Gejak

  reply	other threads:[~2026-10-14  9:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14  7:44 [PATCH rtw-next v6 0/4] wifi: rtw88: sdio: Fix unhandled RX request interrupt storm Alastair D'Silva
2026-10-14  7:44 ` [PATCH rtw-next v6 1/4] wifi: rtw88: sdio: Handle allocation and read errors in rtw_sdio_rxfifo_recv Alastair D'Silva
2026-10-14  7:44 ` [PATCH rtw-next v6 2/4] wifi: rtw88: sdio: Track running state and cancel TX worker on stop Alastair D'Silva
2026-10-14  9:12   ` Luka Gejak [this message]
2026-10-14  7:44 ` [PATCH rtw-next v6 3/4] wifi: rtw88: sdio: Fix unhandled RX request interrupt storm Alastair D'Silva
2026-10-14  9:13   ` Luka Gejak
2026-10-14  7:44 ` [PATCH rtw-next v6 4/4] wifi: rtw88: sdio: Split rtw_sdio_rx_isr into 8051 and 3081 variants Alastair D'Silva
2026-10-14  9:12 ` [PATCH rtw-next v6 0/4] wifi: rtw88: sdio: Fix unhandled RX request interrupt storm Luka Gejak

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=602ff65a1384f1649c49dcab2d17975e17c29d7c@linux.dev \
    --to=luka.gejak@linux.dev \
    --cc=alastair@d-silva.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=pkshih@realtek.com \
    --cc=stable@vger.kernel.org \
    --cc=ulfh@kernel.org \
    /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