Skip to content

thunderbolt: xdomain: do not redo lane bonding on a link that is still bonded (J616s s2idle, #1230) - #1244

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
tb3/xdomain-no-rebond
Nov 8, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
tb3/xdomain-no-rebond

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the J616s half of #1230: thunderbolt-net between the J616s and the M2 died after a few s2idle cycles.

Cause. A resume restarts the XDomain handshake. With QUIRK_NO_SYSTEM_SLEEP the routers stay awake through the sleep, so the link is still up and bonded when the handshake reruns. The handshake bonds the lanes again anyway: the lower-UUID host (the J616s) sends link state requests and both hosts set the link width again. At the same moment thunderbolt-net logs in and activates its DMA paths. In the failing cycle the resume's LINK_STATUS request overlapped thunderbolt-net's path activation. From then on every config read of route 0 timed out and the paths could not come up; XDomain packets to and from the M2 still flowed. Only a reboot recovered it.

Fix. When the downstream port is still bonded and its lanes report a bonded width, skip the link status and bonding states. The first handshake on a new connection still bonds the lanes.

Proof (J616s fleet36 + this patch as test kernel tb3d, cabled to the M2 on fleet36; rtcwake on rtc1, dock keyboard wake off for the run):

kernel cycles with networking back re-bonding / link-state failures / route-0 timeouts
fleet36 wedged at cycle 5 of 12 (and at cycle 2 in an earlier run) every resume / 7 / continuous
fleet36 + this 20/20 0 / 0 / 0

Two reboots (warm) on the test kernel: the link came up at boot both times. The same change ran on the M2 (test kernel tb3c) through the fleet regression suite against fleet36: no hard regressions, 6/6 freezes, s2idle with rtcwake +3.

🤖 Generated with Claude Code

…l bonded

A system resume restarts the XDomain handshake. When the routers were
kept awake through the sleep (QUIRK_NO_SYSTEM_SLEEP) the link is still up
and bonded, but the state machine walks lane bonding again: the host with
the lower UUID sends link state change requests and both hosts re-set the
link width, while thunderbolt-net logs in and activates its DMA paths.

On the J616s (T6040, ACIO v2) talking to an M2, that overlap leaves the
local router's control port unresponsive after a few resumes: every
config space read of route 0 times out, thunderbolt-net cannot enable its
paths, and only a reboot brings the link back.

Skip the link status and bonding states when the downstream port is
already bonded and its lanes report a bonded width. The first handshake
of a new connection still bonds the lanes as before.

Link: #1230
Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant