Repository navigation
usb: typec: tipd: debugfs: a replug of the port's partner on request - #2600
Merged
DjDeveloperr merged 1 commit intoNov 20, 2026
Merged
Conversation
On the J714s, tipd replugs the Dell monitor hub's port (a "DISC" of the partner, unlocked with the board's key, then locked again) when dwc3-apple finds the hub's SuperSpeed side missing after a sleep or at boot. The J714s sleep hang, and the port controller handling that copies macOS, come in sleeps entered soon after such a Type-C event, so testing them needs that event on request, on the kernel under test. Add /sys/kernel/debug/usb/tipd/<device>/replug, write-only for root, on the ports tipd can replug (tipd_replug_supported(): the J714s's SN201202x) that drive a USB role switch, as tipd_port_replug() needs. Writing N (1..10) queues one replug with the partner disconnected for N seconds, exactly as tipd_port_replug() queues it; -EBUSY while one is queued and not yet running (a write while one runs queues another after it, as tipd_port_replug() does). tipd_port_replug()'s queueing moves into tipd_replug_queue(), shared by both. A request finds the port on tipd_ports under tipd_ports_lock, and tipd_port_list_del() takes it off before cancelling the work, so nothing is queued after the cancel. The debugfs directory is now created after the port joins tipd_ports, so the file never exists before the port can take a request. Unlike the "command" file, this needs no CONFIG_TYPEC_TPS6598X_DEBUG_COMMANDS: it only asks for what the driver already does by itself. Signed-off-by: Diljit Singh <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
DjDeveloperr
force-pushed
the
djdev/m5-j714s-tipd-debugfs-replug
branch
from
November 20, 2026 20:03
8bc1ab4 to
63bde14
Compare
This was referenced Nov 20, 2026
Merged
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.
A test trigger for the J714s Type-C replug, so sleep gates can run on the exact merged tree without a TEST commit.
What changes
/sys/kernel/debug/usb/tipd/<device>/replug, mode 0200, only on portstipd_replug_supported()covers (the J714s's SN201202x).tipd_port_replug()queues it after a sleep; -EBUSY while one is pending.tipd_replug_queue().tipd_portsundertipd_ports_lock.tipd_port_list_del()takes the port off before cancelling the work, so nothing gets queued after the cancel.CONFIG_TYPEC_TPS6598X_DEBUG_COMMANDS: it only asks for what the driver already does on its own.Why: the J714s sleep hang and the macOS-entry PRs (#2597 and the rest of the series) concern sleeps entered soon after a Type-C event. Testing them needs that event on demand. Until now that took a TEST-only sysfs attribute.
Review: an independent review found nothing blocking. Fixed from it:
tipd_ports.🤖 Generated with Claude Code