mirror of https://lore.kernel.org/lkml/
 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 1/5] wifi: rtw88: sdio: cache the free TX page counts of the 88xx chips
Date: Tue, 17 Nov 2026 13:50:40 +0100	[thread overview]
Message-ID: <avxNoFNmFRT8Rnmm@hardeman.nu> (raw)
In-Reply-To: <83F543B9-2066-493F-8372-0E36779C1B04@linux.dev>

On Tue, Nov 17, 2026 at 08:20:16AM +0100, Luka Gejak wrote:
>On November 16, 2026 8:01:41 PM GMT+01:00, "David Härdeman"
><david@hardeman.nu> wrote:
>
>> +     free_txpg[0] = rtw_sdio_read32(rtwdev, REG_SDIO_FREE_TXPG);
>> +     free_txpg[1] = rtw_sdio_read32(rtwdev, REG_SDIO_FREE_TXPG + 4);
>> +     free_txpg[2] = rtw_sdio_read32(rtwdev, REG_SDIO_FREE_TXPG + 8);
>
>[ ... ]
>
>> +     rtwsdio->free_txpg_valid = true;
>
>As far as I can see, a failed read can leave bogus credits cached here.
>While the chip is powered on, sdio_readl() returns 0xffffffff on an I/O
>error, and rtw_sdio_read32() only logs the error. That becomes 4095 pages
>in each affected page count.
>
>The first frame can still fit the real page pool and be sent
>successfully. The cache then stays valid, so the next frame can be
>admitted using credits from the failed read even after the real pages
>have been consumed. Previously, the next transfer would read the
>registers again.
>
>Could the sync return an error and leave the cache invalid unless all
>three reads succeed? The individual reads used as a fallback in patch 5
>would need to preserve their errors too.

Yes, I assume Leonard's patches will go in first, and there's already a
read helper there, so when I rebase the patch set, this will be
fixed.

-- 
David Härdeman

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

Thread overview: 14+ 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 " 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 [this message]
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
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
2026-11-17 14:44   ` David Härdeman
2026-11-17 15:27     ` 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=avxNoFNmFRT8Rnmm@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

all inboxes | Powered by JetHome®