Skip to content

usb: typec: tipd: take the USB4 router when it binds after the deferred-probe timeout (aurora-wip) - #858

Merged
DjDeveloperr merged 1 commit into
aurora-wipfrom
fix/cd321x-late-tbt-router-wip
Nov 2, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-wipfrom
fix/cd321x-late-tbt-router-wip

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

The aurora-wip copy of #855 (same code; only comment wording differs from #855's trimmed comments, checked by diffing both patches with comments stripped).

The distribution kernels are pinned from aurora-wip, so the fix lands here as well as on integration/aurora.

Problem

With an encrypted root, the initramfs waits at the passphrase prompt while thunderbolt_apple is not yet loadable. The 10 s deferred-probe timeout fires, cd321x continues without the USB4 router, and it never looks for it again in that boot. No port holds the router, so apple_cio_start() never runs, no NHI is created, the thunderbolt bus stays empty, and every dock (at boot or hot-plugged later) runs USB 2.0 only.

Fix

cd321x continues without the router but takes it when it binds, then re-applies the current cable state.

Tested on hardware (MacBook Pro M2 Pro, J414s, Aurora Fedora 44, kernel 7.3.0-12 with this branch's typec/tipd modules)

  • Stock -12, controller rebound with the router present: dock authorized at 40 Gb/s, USB3 at 10 Gb/s, PCIe tree, external display (confirms the cause).
  • Fix, passphrase prompt left past the timeout: "continuing without it until it binds" at 13.8 s, "router bound, reapplying the cable state" at 28.7 s after unlock; dock at 40 Gb/s, USB3, PCIe, display.
  • Runtime hot-plug, same port and another port: Thunderbolt, six USB3 links and the display back each time (7-13 s).
  • s2idle suspend and resume with the dock attached: DP tunnel re-established, dock and display back.
  • With thunderbolt_apple also in the initramfs (fedora-aurora Mac Studio · M3 family #128): dock found at 4.0 s, no "router unavailable" at all.

Known, separate: the DP tunnel logs "activation failed, aborting" once or twice before it comes up; it recovers on its own.

🤖 Generated with Claude Code

A CD321x port waits for its USB4/Thunderbolt router only until the
driver core stops waiting for missing dependencies, ten seconds after
the last driver bound. After that it continues without the router for
good: a Thunderbolt or USB4 dock still enters TBT mode on the Type-C
side, but ACIO is never started, the NHI is never populated and only
the dock's USB 2.0 hubs appear.

Fedora's initramfs carries tps6598x for USB keyboards at an encrypted
root's passphrase prompt, but not thunderbolt_apple. While the prompt
waits, the deferred probe timeout fires and the ports give up; the
router module loads from the root filesystem twenty seconds later and
registers its switches with nobody to take them. On a J414s with LUKS:

  [14.308] tps6598x 0-003b: deferred probe timeout, ignoring dependency
  [14.308] tps6598x 0-003b: USB4/Thunderbolt router unavailable, continuing without it
  [31.156] systemd[1]: Switching root.

The same machine's Arch install, without LUKS, switches root at 2 s and
its docks work.

Keep a port that gave up on its router watching for it. The typec core
now notifies watchers when a USB4/Thunderbolt switch registers; the port
looks its router up again, takes the switch and reapplies the current
cable through it with the restore event used after system sleep, so a
dock attached since boot gets its tunnels too. The watch starts after
the probe-time lookup and is followed by one lookup of its own, so a
router that registers in between is not missed. Removal stops the
watch and drains a pending lookup before it releases the switch.

Assisted-by: Claude Opus 5.5
Signed-off-by: DjDeveloperr <[email protected]>
@DjDeveloperr
DjDeveloperr merged commit e40cf4f into aurora-wip Nov 2, 2026
RyanTheTide added a commit that referenced this pull request Nov 2, 2026
…outer (#858)

selftests: apple-dcp: follow the late USB4 router watch in cd321x probe
notmysegv pushed a commit to notmysegv/linux that referenced this pull request Nov 4, 2026
Bring integration/aurora up to aurora-wip 437edfa, the source of the
7.3.0-aurora-fleet14b kernel that was promoted on the M1 Pro, M2, Neo
and J616s on 2026-11-01. This takes the aurora-wip work since the
two branches diverged, including the 2026-11-01 sync of
integration/aurora into aurora-wip (aurora-silicon#761), up to and including aurora-silicon#764.

integration/aurora had two changes aurora-wip lacked at this point:
the tipd late USB4 router fix (aurora-silicon#855) and SEP keybag creation in the
shared xART window (aurora-silicon#856). aurora-wip carries the same patches as aurora-silicon#858
and aurora-silicon#860, which come in with a later batch. Two conflicts, both where
the two sides added lines next to each other: the KUnit prototype list
in tps6598x.h (both kept, in aurora-silicon#858's order) and the aurora-sep PKGBUILD
checksums (recomputed from the merged files; they match aurora-silicon#860's). The
merged tree is identical to aurora-wip 437edfa with the aurora-silicon#858 and aurora-silicon#860
patches applied.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
notmysegv pushed a commit to notmysegv/linux that referenced this pull request Nov 4, 2026
…nto integration/aurora

Bring integration/aurora up to the aurora-wip tip 9ff2b9a. After this
merge the two branches have the same tree.

The range contains the fleet14o source c243830 (aurora-silicon#857, aurora-silicon#858, aurora-silicon#795,
aurora-silicon#859), which was promoted on all four machines on 2026-11-02 and 03, and
the merges after it: aurora-silicon#861 (apple-dcp selftest stubs for aurora-silicon#858), aurora-silicon#860
(SEP keybag in the shared xART window, the aurora-wip copy of aurora-silicon#856),
aurora-silicon#724 (J616s boot NOR, both parts), aurora-silicon#779 (ALS colour temperature ABI),
aurora-silicon#862 (J700 GD25UF16E boot NOR, the Neo bless fix), aurora-silicon#863 (J616s ANE H16
start stall), aurora-silicon#797 (T6000 DCS whole-word writes) and aurora-silicon#803 (G17 keeps
innocent clients alive across another client's recovery).

aurora-silicon#858 and aurora-silicon#860 make the same changes integration/aurora already had as
aurora-silicon#855 and aurora-silicon#856, so they merge without conflicts.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide deleted the fix/cd321x-late-tbt-router-wip branch November 7, 2026 12:06
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