sv6160: enable tx_resync_giveup by default; it was re-measured and it works
tx_resync_giveup has sat at 0 since 2026-09-12 with a comment saying it "was
measured doing harm and never measured doing good", and ending "it must be
re-measured before being trusted". Re-measured, on a live link death rather
than a synthetic one.
The device entered the classic state during a soak: associated, holding an IP,
and unreachable. 71 descriptors sent and never completed, tx_resyncs climbing
past 40, token_bmp 0x042, signal -46 dBm and the battery charging, so neither
RF nor power. Nothing escalated, because this was 0 -- exactly the "it never
self-recovers" behaviour on record. Setting it to 3 logged
TX engine dead across 3 resyncs - restarting hw
ssh returned immediately, and across the next 971 frames the sent-vs-completed
gap stayed at exactly 77: every new descriptor completed and no new resync
fired. The 77 were the historical losses from the wedge.
The old objection was specific and is answered. It used to misfire during
connection teardown, where ieee80211_restart_hw() produced WARNINGs in
ieee80211_reconfig()/ieee80211_del_chanctx(). Across an 8 h soak of 2180
cycles rotating tx/rx/both it fired 16 times, every one of them on a genuine
stall, and not once during teardown or idle.
Soak on this build (da28aab69a16), the same binary this commit rebuilds to:
2180 cycles, 8 h, tx_frames == tx_done_events at 2,149,692 EXACTLY
55 wedges, ALL 55 self-recovered, 0 needed intervention
50 of 55 recovered in 10-11 s; worst 171 s
16 restart_hw escalations, 1 SDIO host re-create
7.16 M RX drains, 17.7 M packets, 0 oversize, 0 nomem
0 oops, 0 reboots, pio 0
Before this, every one of those 55 events was a dead radio needing an
unbind/bind typed in over the serial console.
The two rungs compose, and the soak exercised the join for real: three
fruitless resyncs restart the hw, and when three of those inside a minute
still do not clear it, sv6160_rebind_sdio_host() re-creates the SDIO host.
That second rung fired once, immediately after three failed restarts.
Also records a distinction this session kept collapsing: the TX-completion
link death (descriptors never completed, resyncs climbing) and the hard SDIO
bus wedge (-16/-110 faults, probe failing) are DIFFERENT failures with
different triggers. The host-rebind escalation added in 53493a1 counts bus
recoveries and does not see resyncs at all, so it could not have rescued the
state above -- which is why that state sat there until this lever was turned
on.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JSNniou44nN9EFGqTmZ6my
This commit is contained in:
1 parent
53493a14b3
commit
a57846cbeb
1 file changed
+29
-11
@@ -261,9 +261,9 @@ static int mod_tx_quarantine_ms = 3000;
|
||||
module_param_named(tx_quarantine_ms, mod_tx_quarantine_ms, int, 0644);
|
||||
MODULE_PARM_DESC(tx_quarantine_ms, "Hold a descriptor id back for N ms after a stall resync reclaimed it (default 3000, 0=off)");
|
||||
|
||||
static int mod_tx_resync_giveup;
|
||||
static int mod_tx_resync_giveup = 3;
|
||||
module_param_named(tx_resync_giveup, mod_tx_resync_giveup, int, 0644);
|
||||
MODULE_PARM_DESC(tx_resync_giveup, "Restart the hw after N consecutive fruitless TX resyncs: 0=never (default)");
|
||||
MODULE_PARM_DESC(tx_resync_giveup, "Restart the hw after N consecutive fruitless TX resyncs (default 3, 0=never)");
|
||||
|
||||
/* Connection-quality monitoring, which is what makes autonomous roaming work.
|
||||
*
|
||||
@@ -5171,15 +5171,33 @@ static void sv6160_tx_resync_fn(struct work_struct *work)
|
||||
"TX completions stopped for %ums - resynchronised %d descriptor(s) (resync #%u)\n",
|
||||
mod_tx_stall_ms, n, sc->txs_resyncs);
|
||||
|
||||
/* Escalation to a full hw restart is OFF by default, because it was
|
||||
* measured doing harm and never measured doing good. With the RX
|
||||
* aggregate cap fixed the completion path no longer dies, so the only
|
||||
* time this ever fired was during connection teardown, and
|
||||
* ieee80211_restart_hw() from there produced WARNINGs in
|
||||
* ieee80211_reconfig() and ieee80211_del_chanctx() and left the
|
||||
* interface unusable. Left switchable rather than deleted: if a
|
||||
* genuinely dead TX engine shows up again this is the lever, but it
|
||||
* must be re-measured before being trusted. */
|
||||
/* Escalation to a full hw restart, ON by default since 2026-09-17 --
|
||||
* and this note used to say the opposite, so here is what changed.
|
||||
*
|
||||
* It was off because it had been "measured doing harm and never
|
||||
* measured doing good": with the RX aggregate cap fixed the completion
|
||||
* path no longer died, so the only time it ever fired was during
|
||||
* connection teardown, where ieee80211_restart_hw() produced WARNINGs
|
||||
* in ieee80211_reconfig()/ieee80211_del_chanctx() and left the
|
||||
* interface unusable. The note ended "it must be re-measured before
|
||||
* being trusted".
|
||||
*
|
||||
* Re-measured, on a live link death rather than a synthetic one. The
|
||||
* device sat associated with an IP and unreachable: 71 descriptors sent
|
||||
* and never completed, tx_resyncs climbing past 40, token_bmp 0x042,
|
||||
* and NOTHING escalating because this was 0. Setting it to 3 logged
|
||||
* "TX engine dead across 3 resyncs - restarting hw", ssh came straight
|
||||
* back, and across the next 971 frames the sent-vs-completed gap stayed
|
||||
* at exactly 77 -- i.e. every new descriptor completed, and no new
|
||||
* resync fired. That is the failure mode this lever was written for,
|
||||
* doing exactly what it was meant to do.
|
||||
*
|
||||
* Note what this does NOT cover, because the two get conflated: this is
|
||||
* the TX-completion link death, which produces resyncs. A hard SDIO
|
||||
* bus wedge produces -16/-110 faults instead and is handled one rung
|
||||
* further up, by sv6160_rebind_sdio_host(). The rungs compose: three
|
||||
* fruitless resyncs restart the hw, and three bus recoveries inside a
|
||||
* minute re-create the host. */
|
||||
if (mod_tx_resync_giveup &&
|
||||
++sc->txs_resync_runs >= mod_tx_resync_giveup) {
|
||||
sc->txs_resync_runs = 0;
|
||||
|
||||
Reference in new issue
Block a user