Skip to content

selftests: apple-dcp: follow the late USB4 router watch in cd321x probe - #861

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
selftests/apple-dcp-tbt-late
Nov 2, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
selftests/apple-dcp-tbt-late

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

#858 made cd321x_register_port() watch for a USB4/Thunderbolt router that binds after the port gave up. The apple-dcp host units typec-probe and probe-mux-pm-dispatch extract that function. Their mocks had no cd321x_tbt_watch_late(), INIT_WORK() or the new struct cd321x members, so both units stopped building and the host gate dropped to 174/175 (apple-dcp 83/85) on aurora-wip c243830.

This changes test files only, and nothing in the driver. The mock watch holds the port fwnode until unregister, like the driver does, and cd321x_stop_work() ends it. New checks:

  • a port probed without its router watches for it
  • a watch that cannot start leaves the port probed without one
  • a router present at probe needs no watch
  • every case leaves the watch and the fwnode refs balanced

The harness only changes when the tree has cd321x_tbt_watch_late(), so older trees build as before.

Testing on c243830 plus this commit (buildbox): tools/asahi/run-host-tests.py 175/175, apple-dcp run.py 85/85.

🤖 Generated with Claude Code

The typec-probe and probe-mux-pm-dispatch units extract the real
cd321x_register_port() and cd321x_unregister_port(). Since the port keeps
watching for a USB4/Thunderbolt router that binds after it gave up, both
use cd321x_tbt_watch_late(), INIT_WORK() and three new struct cd321x
members, and the units no longer build.

Mock the watch the way the driver uses it: it holds the port fwnode until
the port is unregistered and cd321x_stop_work() ends it. Check that a port
probed without its router watches for it, that a watch which cannot start
leaves the port probed without one, that a router present at probe needs
no watch, and that every case leaves the watch and fwnode balanced.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide merged commit 467335c into aurora-wip Nov 2, 2026
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 selftests/apple-dcp-tbt-late 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