Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: rcfa <kernel@cubiculum.net>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Zong-Zhe Yang <kevin_yang@realtek.com>
Subject: RE: [PATCH rtw-next] wifi: rtw89: allocate rfe_data with kvzalloc
Date: Wed, 11 Nov 2026 03:09:05 +0000	[thread overview]
Message-ID: <ec14ad0998374fbe983ca8a53afb064e@realtek.com> (raw)
In-Reply-To: <20261107230713.3675421-1-kernel@cubiculum.net>


rcfa <kernel@cubiculum.net> wrote:
> struct rtw89_rfe_data holds the TX power tables from the firmware
> file's elements and is 1190784 bytes, so kzalloc() asks for an order-9
> (2 MiB) contiguous block. On a host that has been up for a while there
> may be none, and probing a USB adapter that is plugged in then fails:
> 
>   kworker/12:1: page allocation failure: order:9, mode:0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP)
>   ...
>   failed to recognize firmware elements
>   failed to setup chip information
>   probe with driver rtw89_8922au_git failed with error -12

Below commit messages are not necessary except to 
"Tested on an RTL8922AU (a USB 2 adapter)"

> 
> Only the CPU reads the tables, so allocate them with kvzalloc() and
> free them with kvfree().
> 
> Tested on an RTL8922AU (a USB 2 adapter) with the out-of-tree copy of
> this driver (morrownr/rtw89, which carries rtw-next as of 2026-11-05;
> hence the module name above), kernel 7.2.15. The failure came from
> replugging the adapter after 16 hours of uptime, when the Normal zone
> had no free block of order 8 or above. With this change the driver
> probes, connects and unloads cleanly. A test build that always used
> vzalloc() for rfe_data, to exercise the fallback path, put the tables in
> vmalloc space (1196032 bytes in /proc/vmallocinfo), showed the same
> debugfs txpwr_table as the unchanged driver on the same association,
> passed traffic and unloaded without warnings.
> 
> The problem was found with Claude Code (Claude Opus 5.5) while testing
> the driver, and this change and changelog were written in the same
> session.
> 
> Fixes: 5ee7b2ea07cc ("wifi: rtw89: load TX power related tables from FW elements")
> Signed-off-by: rcfa <kernel@cubiculum.net>

Use your real name.



      reply	other threads:[~2026-11-11  3:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07 23:07 [PATCH rtw-next] wifi: rtw89: allocate rfe_data with kvzalloc rcfa
2026-11-11  3:09 ` Ping-Ke Shih [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=ec14ad0998374fbe983ca8a53afb064e@realtek.com \
    --to=pkshih@realtek.com \
    --cc=kernel@cubiculum.net \
    --cc=kevin_yang@realtek.com \
    --cc=linux-wireless@vger.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