All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Louis Kotze <loukot@gmail.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"rtl8821cerfe2@gmail.com" <rtl8821cerfe2@gmail.com>
Subject: RE: [PATCH v2] wifi: rtw89: phy: increase RF calibration timeouts for USB transport
Date: Thu, 16 Apr 2026 01:15:30 +0000	[thread overview]
Message-ID: <1a90ff00d83c47b995cf75165b2a304b@realtek.com> (raw)
In-Reply-To: <20260415111339.453602-1-loukot@gmail.com>

Louis Kotze <loukot@gmail.com> wrote:
> USB transport adds significant latency to H2C/C2H round-trips used
> by RF calibration. The existing timeout values were designed for PCIe
> and are too tight for USB, causing "failed to wait RF DACK",
> "failed to wait RF TSSI" and similar errors on USB adapters.
> 
> Apply a 4x timeout multiplier when the device uses USB transport.
> The multiplier is applied in rtw89_phy_rfk_report_wait() so all
> calibrations benefit without changing any call sites or PCIe
> timeout values.
> 
> The 4x multiplier was chosen based on measured data from two
> independent testers (RTL8922AU, 6GHz MLO and 2.4/5GHz):
> 
>   Calibration   PCIe timeout   Max measured (USB)   4x timeout
>   PRE_NTFY           5ms              1ms              20ms
>   DACK              58ms             72ms             232ms
>   RX_DCK           128ms            374ms             512ms
>   TSSI normal       20ms             24ms              80ms
>   TSSI scan          6ms             14ms              24ms
>   TXGAPK            54ms             18ms             216ms
>   IQK               84ms             53ms             336ms
>   DPK               34ms             30ms             136ms
> 
> Tested with RTL8922AU on 6GHz MLO (5GHz + 6GHz simultaneous):
> 25 connect/disconnect cycles with zero failures.
> 
> In response to review feedback on v1, 

Can we remove this phrase? No need to mention v1 in commit message. 

> the 4x multiplier was also
> re-verified under adverse host conditions on 5GHz. 5 cycles per
> scenario, stress-ng as the load generator, max observed time per
> calibration:
> 
>   Calibration  PCIe  4x   Baseline  CPU stress  Mem stress  Combined
>   PRE_NTFY       5   20     0         0           0           1
>   DACK          58  232    71 (!)    71 (!)      71 (!)      71 (!)
>   RX_DCK       128  512    23        22          22          23
>   IQK           84  336    53        53          53          53
>   DPK           34  136    23        23          26          23
>   TSSI          20   80     6         9          14           9
>   TXGAPK        54  216    16        16          16          16
> 
> Legend: (!) = exceeds PCIe budget but within 4x budget.
> 
> Two observations from that matrix:
> 
> 1. DACK exceeds the stock PCIe budget (58ms) in baseline on 5GHz
>    on this hardware. Without the 4x multiplier, DACK fails
>    -ETIMEDOUT deterministically on every connect, no stress
>    needed. This is the specific bug the patch fixes.

I'm not sure this should be called "bug", as Bitterblue has not adjusted
these timeout time by earlier version. 

> 
> 2. Calibration times are I/O bound (USB H2C/C2H round-trip
>    latency), 

I'm also not sure if this is correct. The calibration time of DACK might
rely on WiFi hardware and external components, not only I/O speed. 

> not CPU or memory bound. DACK stays at 71ms across
>    all four scenarios. Host-side stress has essentially zero
>    effect on observed calibration duration. Bumping the
>    multiplier above 4x would not address a failure mode that
>    this stress matrix produces.
> 
> Signed-off-by: Louis Kotze <loukot@gmail.com>

Otherwise, patch content looks good to me.

Acked-by: Ping-Ke Shih <pkshih@realtek.com>



  reply	other threads:[~2026-04-16  1:15 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26 17:02 [PATCH rtw-next 00/12] wifi: rtw89: Add support for RTL8922AU Bitterblue Smith
2026-03-26 17:03 ` [PATCH rtw-next 01/12] wifi: rtw89: usb: Disable MLO for now Bitterblue Smith
2026-03-30  2:59   ` Ping-Ke Shih
2026-04-04 14:07     ` Bitterblue Smith
2026-03-26 17:04 ` [PATCH rtw-next 02/12] wifi: rtw89: usb: Support 2 bulk in endpoints Bitterblue Smith
2026-03-30  3:16   ` Ping-Ke Shih
2026-03-26 17:04 ` [PATCH rtw-next 03/12] wifi: rtw89: Fix rtw89_usb_ops_mac_lv1_rcvy() for RTL8922AU Bitterblue Smith
2026-03-30  3:36   ` Ping-Ke Shih
2026-03-26 17:05 ` [PATCH rtw-next 04/12] wifi: rtw89: Fix rtw89_usb_ops_mac_pre_init() " Bitterblue Smith
2026-03-30  3:39   ` Ping-Ke Shih
2026-03-26 17:05 ` [PATCH rtw-next 05/12] wifi: rtw89: Fix rtw89_usb_ops_mac_post_init() " Bitterblue Smith
2026-03-30  3:41   ` Ping-Ke Shih
2026-03-26 17:06 ` [PATCH rtw-next 06/12] wifi: rtw89: usb: Enable RX aggregation " Bitterblue Smith
2026-03-30  3:46   ` Ping-Ke Shih
2026-04-01 22:58     ` Bitterblue Smith
2026-03-26 17:06 ` [PATCH rtw-next 07/12] wifi: rtw89: Fix rtw8922a_pwr_{on,off}_func() for USB Bitterblue Smith
2026-03-30  3:54   ` Ping-Ke Shih
2026-03-26 17:07 ` [PATCH rtw-next 08/12] wifi: rtw89: Let hfc_param_ini have separate settings for USB 2/3 Bitterblue Smith
2026-03-30  3:59   ` Ping-Ke Shih
2026-03-26 17:08 ` [PATCH rtw-next 09/12] wifi: rtw89: Add rtw8922a_hfc_param_ini_usb{2,3} Bitterblue Smith
2026-03-30  4:01   ` Ping-Ke Shih
2026-03-26 17:08 ` [PATCH rtw-next 10/12] wifi: rtw89: Add rtw8922a_dle_mem_usb{2,3} Bitterblue Smith
2026-03-30  4:25   ` Ping-Ke Shih
2026-03-26 17:09 ` [PATCH rtw-next 11/12] wifi: rtw89: Add rtw8922au.c Bitterblue Smith
2026-03-30  4:27   ` Ping-Ke Shih
2026-03-26 17:09 ` [PATCH rtw-next 12/12] wifi: rtw89: Enable the new rtw89_8922au module Bitterblue Smith
2026-03-30  4:30   ` Ping-Ke Shih
2026-03-30  2:53 ` [PATCH rtw-next 00/12] wifi: rtw89: Add support for RTL8922AU Ping-Ke Shih
2026-04-01 17:43   ` Bitterblue Smith
2026-04-02  0:48     ` Ping-Ke Shih
2026-04-07 20:41       ` Bitterblue Smith
2026-04-08  0:46         ` Ping-Ke Shih
2026-04-10  8:00           ` [PATCH 0/2] wifi: rtw89: fix RF calibration for USB transport Louis Kotze
2026-04-10  8:00             ` [PATCH 1/2] wifi: rtw89: phy: increase RF calibration timeouts " Louis Kotze
2026-04-14  6:32               ` Ping-Ke Shih
2026-04-15 11:13                 ` Louis Kotze
2026-04-10  8:00             ` [PATCH 2/2] wifi: rtw89: phy: make RF calibration timeouts non-fatal on USB Louis Kotze
2026-04-14  6:39               ` Ping-Ke Shih
2026-04-15 11:13                 ` Louis Kotze
2026-04-15 11:13             ` [PATCH v2] wifi: rtw89: phy: increase RF calibration timeouts for USB transport Louis Kotze
2026-04-16  1:15               ` Ping-Ke Shih [this message]
2026-04-16  4:56                 ` Louis Kotze

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=1a90ff00d83c47b995cf75165b2a304b@realtek.com \
    --to=pkshih@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loukot@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.