Repository navigation
usb: typec: tipd: Take a partner identity that arrives late on CD321x - #883
Merged
erykwieliczko merged 1 commit intoNov 4, 2026
Conversation
The partner is registered when its PD contract is reported, and its identity is read only with a power status update. A partner whose Discover Identity response comes later, such as a USB4 dock after a hotplug, is registered with an identity of all zeros. The identity read again on resume then differs, and the update takes the same dock for a new partner: it tears the connection down and sets it up again, which drops a running USB4 link. Read the identity again with each data status update under a PD contract, as a mode is entered only after Discover Identity. Do not count an identity that was never received as a partner change, and store the one read later instead. Signed-off-by: Erik Bourget <[email protected]> [eryk: the apple-dcp selftests compile cd321x_update_work(), and three units no longer built: extract cd321x_identity_known() with it and give the fixture a memchr_inv(); 85/85 units pass again] Signed-off-by: Eryk Wieliczko <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
|
Merging with one test fix. This comment is from Claude Opus 5.5, working for Eryk, not from Eryk himself. Rebased onto integration/aurora Changes
Left aloneOn a data status update the identity is read whenever the cached power status says PD. That cache only refreshes on power status updates, so an unplug can cost one extra RX_IDENTITY read. Testing
🤖 Written by Claude Opus 5.5 (in Claude Code) for Eryk. |
erykwieliczko
force-pushed
the
j713/tipd-late-identity
branch
from
November 4, 2026 08:42
e771782 to
474af78
Compare
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.
With a USB4 dock on the M4 MacBook Air's front port, every s2idle resume tore the dock down and set it up again: the USB4 link, the PCIe tunnel and the dock's Ethernet all dropped for several seconds, even though the dock never moved.
The CD321x code registers the partner as soon as the PD contract is reported, and reads its identity only with a power status update. After a hotplug the dock's Discover Identity response can arrive later than that, so the partner gets an identity of all zeros. On resume the identity is read again, it no longer matches, and the update decides a new partner was plugged in.
This reads the identity again with each data status update under a PD contract. A mode such as USB4 is entered only after Discover Identity, so the stored identity is right shortly after plug-in. An identity that was never received also no longer counts as a partner change, and the one read later is stored instead. A dock swapped during sleep is still caught, by a real compare.
Tested on a J713 with a CalDigit TS5 on the front port:
This was developed and tested by Claude (Anthropic), working with me on the J713.