Skip to content

usb: typec: tipd: keep a dock's USB when its display has no pipeline (M1/M2) - #1023

Merged
RyanTheTide merged 2 commits into
integration/aurorafrom
fix/dcp-typec-busy-keeps-usb
Nov 6, 2026
Merged

RyanTheTide merged 2 commits into
integration/aurorafrom
fix/dcp-typec-busy-keeps-usb

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

On an M1 or M2 with a monitor on one USB-C port and a dock on the other, the dock's USB never came up, so nothing behind it worked (keyboard, mouse, storage, wired network). The log had three "failed to configure Type-C connection: -28" lines and "cable revalidation failed".

These Macs have one external display pipeline. The monitor holds it, so the DCP route answers the dock's DP alt mode with -ENOSPC ("no free pipeline"), which it does on every SoC now. tipd only treated -ENOSPC as a taken display on T8140/T8142 and still expected -EBUSY elsewhere, left over from when the route returned -EBUSY. So on M1/M2 the whole mux transaction failed and was retried until it gave up, and the dock's USB path was never set.

With this, -ENOSPC means a taken display on every SoC. The port sets up USB without the display (the same path the Neo already takes) and the DCP route gives the dock's display a pipeline when the other monitor goes away. -EBUSY is retried everywhere, which is what the route means by it now. The warning for this case is now debug only, since the DCP route already logs which display waits.

Tested on the M2 (fleet17 + this, one-shot boot):

  • dock on port 2 enumerates: hubs, keyboard, mouse, a T7 SSD on UAS at 10G, the dock's USB audio and cdc_ncm ethernet, which got its DHCP address
  • the monitor on the other port stays lit, the dock's display logs that it waits
  • dock and ethernet still there after 10 s2idle cycles
  • 0 AVCs, aurora-diag the same as fleet17 (115 pass, 0 fail)

M1 Pro regression boot: no change to its Type-C ports, 0 AVCs. Host tests 185/185, including the apple-dcp typec-probe and lifecycle selftests that already expect the single-argument helper.

🤖 Generated with Claude Code

…line

The DCP route reports a Type-C port that finds no free display pipeline
as -ENOSPC on every SoC (dcp_typec_route_set()).  cd321x_display_taken()
took -ENOSPC as a taken display only on T8140 and T8142, a leftover from
when the route still returned -EBUSY on the other SoCs.

On an M1 or M2, which have one external display pipeline, a monitor on
one port and a dock on the other therefore failed the dock's whole Type-C
connection: "failed to configure Type-C connection: -28" three times,
then "cable revalidation failed".  The mux transaction was aborted and
retried, and the dock's USB devices and network never came up.

Take -ENOSPC as a taken display on every SoC.  The port then sets up its
USB path without the display, as on T8140 and T8142, and the DCP route
gives the display a pipeline when one frees.  -EBUSY keeps its meaning on
each SoC.  Log the waiting display at debug level: the DCP route already
says which display waits.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The previous commit took -ENOSPC as a taken display everywhere but kept
-EBUSY as one on SoCs other than T8140 and T8142.  That -EBUSY rule dates
from when the DCP route still returned it for a taken pipeline there.  The
route now returns -EBUSY only for a crossbar or PHY that is mid-transition,
which clears on its own and should be retried, as it already is on T8140
and T8142.

Use one rule on every SoC: -ENOSPC is a taken display, anything else is
retried.  This is the contract the apple-dcp selftests already expect from
a tree with the single-argument helper.

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