Linux wireless drivers development
 help / color / mirror / Atom feed
From: "David Härdeman" <david@hardeman.nu>
To: Luka Gejak <luka.gejak@linux.dev>
Cc: Ping-Ke Shih <pkshih@realtek.com>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	Leonard Lausen <leonard@lausen.nl>,
	Alastair D'Silva <alastair@d-silva.org>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Bitterblue Smith <rtl8821cerfe2@gmail.com>
Subject: Re: [PATCH rtw-next 3/5] wifi: rtw88: sdio: limit the TX queue length of the 88xx chips
Date: Tue, 17 Nov 2026 13:57:59 +0100	[thread overview]
Message-ID: <avxPV6EFa6PrHG6S@hardeman.nu> (raw)
In-Reply-To: <B58755EF-D7EC-47C5-8DED-EB19A880CE26@linux.dev>

On Tue, Nov 17, 2026 at 08:21:50AM +0100, Luka Gejak wrote:
>On November 16, 2026 8:01:43 PM GMT+01:00, "David Härdeman"
><david@hardeman.nu> wrote:
>
>> +             if (ret == -EBUSY && !rtw_chip_wcpu_8051(rtwdev))
>> +                     resched = true;
>
>I think -ENOMEM needs a retry here too. mmc_io_rw_extended() allocates a
>scatterlist when a transfer needs more than one segment. For example,
>dw_mmc with IDMAC sets max_seg_size to 4096, so an aggregate larger than
>that can fail this allocation and return -ENOMEM.

You're right, I'll fix that in v2.

>> +     if (resched)
>> +             queue_delayed_work(rtwsdio->txwq, &work_data->work,
>> +                                RTW_SDIO_TX_RETRY_DELAY);
>
>So if I read it right, this also needs the work to be cancelled when the
>SDIO interface stops. The power off path is:
>
>        rtw_power_off()
>                rtw_hci_stop()
>                        rtw_sdio_stop()
>                rtw_mac_power_off()
>
>rtw_sdio_stop() only disables interrupts and invalidates the credits.
>The cancellation is in rtw_sdio_deinit_tx(), which closing the interface
>does not call. The flush callback does not drain the SDIO software queues
>either, since the SDIO operations have no flush_queues callback.
>
>A pending retry can therefore run after power off and keep rearming
>while credits are unavailable. The RTL8723BS retry helper seems to have
>the same lifetime gap already, so maybe the shared stop path is the right
>place to fix this before extending the retries to the other chips?

Good catch, and I think this is fixed by Alastair's series, which I'll
base the v2 on (+ Leonard's series).

-- 
David Härdeman

  reply	other threads:[~2026-11-17 12:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 19:01 [PATCH rtw-next 0/5] wifi: rtw88: sdio: faster and fairer TX for the 88xx chips David Härdeman
2026-11-16 19:01 ` [PATCH rtw-next 1/5] wifi: rtw88: sdio: cache the free TX page counts of " David Härdeman
2026-11-17  7:20   ` Luka Gejak
2026-11-17 12:50     ` David Härdeman
2026-11-16 19:01 ` [PATCH rtw-next 2/5] wifi: rtw88: sdio: aggregate TX frames " David Härdeman
2026-11-16 19:01 ` [PATCH rtw-next 3/5] wifi: rtw88: sdio: limit the TX queue length " David Härdeman
2026-11-17  7:21   ` Luka Gejak
2026-11-17 12:57     ` David Härdeman [this message]
2026-11-16 19:01 ` [PATCH rtw-next 4/5] wifi: rtw88: sdio: let TX in while receiving on " David Härdeman
2026-11-16 19:01 ` [PATCH rtw-next 5/5] wifi: rtw88: sdio: read neighbouring registers of the 88xx chips at once David Härdeman
2026-11-16 21:59 ` [PATCH rtw-next 0/5] wifi: rtw88: sdio: faster and fairer TX for the 88xx chips Luka Gejak
2026-11-17  7:46 ` Ping-Ke Shih

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=avxPV6EFa6PrHG6S@hardeman.nu \
    --to=david@hardeman.nu \
    --cc=alastair@d-silva.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=leonard@lausen.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luka.gejak@linux.dev \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=pkshih@realtek.com \
    --cc=rtl8821cerfe2@gmail.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