Skip to content

usb: dwc3: apple: report missing SuperSpeed devices after J714s sleep - #2078

Draft
DjDeveloperr wants to merge 2 commits into
integration/aurorafrom
djdev/j714s-typec-ss-resume-log
Draft

DjDeveloperr wants to merge 2 commits into
integration/aurorafrom
djdev/j714s-typec-ss-resume-log

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Validation correction (2026-11-16): The sleep harness rejected (mem) / (logind) in its return-marker parser, so its duration column was missing. Re-parsing the 24 default-candidate cycles gives only approximately 0–1 s asleep (RTC resolution ±1 s), not 30 s: every return was 22–23 s before its programmed +30 s alarm. These rows establish suspend/resume and immediate recovery only. They do not validate sustained deep sleep, long-hold GPU stability, or long-hold dock recovery. The early wake is under investigation. Qualification with actual 30 s, 5 min and 30 min holds is pending; rootfs sleep enablement is withheld.


The Dell S2725QC's USB2 hub can return after deep sleep while its SuperSpeed side remains absent. Ordinary host-start messages do not distinguish that case from a successful wake.

Remember whether a SuperSpeed device was present before suspend and check once, five seconds after the next Type-C host start. If only a USB2 device returns, log its identity, the first two xHCI PORTSC words and DWC3 LTSSM. This adds diagnostics only. It does not reset the host, retrain the link, or change PHY/controller state. The check is limited to J714s T6050 Type-C hosts; the existing fixed-hub recovery is unchanged.

Validation: native M5 build; the same control flow ran through 24 docked deep-sleep cycles in the default candidate. The diagnostic captured the missing monitor SuperSpeed side with Rx.Detect and port reset asserted. The monitor's USB2 side and the other attached devices returned. This does not fix the SuperSpeed loss. Compared with the hardware-tested source, this standalone integration/aurora commit changes comments and removes the TEST prefix from the diagnostic messages.

checkpatch: zero errors; one required author/sign-off naming warning, plus style checks for the USB descriptor field names and the boolean pointer comparison. Draft for review as a diagnostic change; the underlying monitor-port recovery remains open.

A Type-C monitor's USB2 hub can return after deep sleep while its
SuperSpeed side remains absent. The ordinary host-start messages do not
distinguish these failed wakes from successful ones.

Remember whether a SuperSpeed device was present before suspend. Five
seconds after the next host start, check once for its return. If only a
USB2 device is present, report its identity, the first two xHCI PORTSC
words and the DWC3 LTSSM. This adds diagnostics only; it does not reset
a port, retry link training or change the PHY or controller state.

Limit the check to J714s T6050 Type-C hosts. Keep the existing fixed-hub
recovery path unchanged.

Signed-off-by: Diljit Singh <hey@djdev.me>
The teardown fixture extracts the production role-switch callback. Model
its new diagnostic ownership field and delayed-check scheduling boundary,
so the extracted unit continues to compile. Check that an ordinary cable
detach or attach clears stale diagnostic ownership.

The fixture does not execute the delayed USB diagnostic or claim hardware
coverage for it.

Signed-off-by: Diljit Singh <hey@djdev.me>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Early note on this draft (no full review yet):

  1. drivers/usb/dwc3/dwc3-apple.c:1279-1280: dwc3_apple_ss_port() limits the post-sleep SuperSpeed check to one board (dwc3_apple_sleep_board(), i.e. of_machine_is_compatible("apple,j714s")) and one SoC compatible (apple,t6050-dwc3). The check reads only generic xHCI/DWC3 state and logs, so it can apply to every Type-C host with a role switch (!fixed_hub && role_sw); if it must stay limited to controllers that have the PHY behaviour, key it on a DT property of the controller or PHY rather than the board or SoC.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

This diagnostic is already on integration/aurora 110861f. It landed as ec5831c ("usb: dwc3: apple: J714s: log a Type-C hub's missing SuperSpeed side after a sleep") through #2274, together with the port replug that recovers the SuperSpeed side. The code there matches this commit apart from comment and message wording, so this PR looks superseded by #2274. The one piece not on the tip is the selftest case diagnostic_role_lifetime() in the dwc3 selftest (cases.c/mocks.c: a role change to none and back to host clears the pending SuperSpeed retry), which could go in as a small test-only PR on its own. The earlier note about the apple,j714s board check in dwc3_apple_ss_port() now applies to the code on the tip.

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.

2 participants