Repository navigation
thunderbolt: xdomain: do not redo lane bonding on a link that is still bonded (J616s s2idle, #1230) - #1244
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_SLEEPthe 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):
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