Linux USB
 help / color / mirror / Atom feed
* [PATCH 0/3] usb: typec: tcpm: Fixes for talking to the cable plug as a VCONN source
@ 2026-11-17 11:15 Alexey Charkov
  2026-11-17 11:15 ` [PATCH 1/3] usb: typec: tcpm: Keep the Soft_Reset target apart from the VDM one Alexey Charkov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Alexey Charkov @ 2026-11-17 11:15 UTC (permalink / raw)
  To: Badhri Jagan Sridharan, Heikki Krogerus, Greg Kroah-Hartman,
	RD Babiera
  Cc: Sebastian Reichel, linux-usb, Alexey Charkov, stable

When a TCPM port is the VCONN source, its exchanges with the cable plug
on SOP' can leave state behind that later affects the port partner.

Patch 1 fixes a Soft_Reset meant for the port partner being sent to the
cable plug after any SOP' VDM, which left a source without a contract
until unplugged.

Patch 2 fixes SRC_VDM_IDENTITY_REQUEST: it either replays
Source_Capabilities after the first contract, or stalls until a Hard
Reset if the cable plug NAKs or never answers.

Patch 3 is hardening rather than a fix for any known device: it keeps
messages from a cable plug that breaks the rules from reaching the port
partner's handlers.

The first two carry Fixes: tags and are meant for stable. They are
independent of each other and of patch 3.

Tested on two FUSB302B ports (RK3576), source to sink through an
e-marked cable, plus injected cable plug answers (ACK, NAK,
Not_Supported, none) and stray SOP' messages.

Signed-off-by: Alexey Charkov <alchark@flipper.net>
---
Alexey Charkov (3):
      usb: typec: tcpm: Keep the Soft_Reset target apart from the VDM one
      usb: typec: tcpm: Leave SRC_VDM_IDENTITY_REQUEST whatever the cable answers
      usb: typec: tcpm: Keep cable plug messages away from the port partner

 drivers/usb/typec/tcpm/tcpm.c | 94 ++++++++++++++++++++++++++++++++++++-------
 1 file changed, 79 insertions(+), 15 deletions(-)
---
base-commit: 749a4de370409464cf8501ec5b2451df45c84eb4
change-id: 20261104-tcpm-soft-reset-sop-96b4a156f823

Best regards,
--  
Alexey Charkov <alchark@flipper.net>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-17 11:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 11:15 [PATCH 0/3] usb: typec: tcpm: Fixes for talking to the cable plug as a VCONN source Alexey Charkov
2026-11-17 11:15 ` [PATCH 1/3] usb: typec: tcpm: Keep the Soft_Reset target apart from the VDM one Alexey Charkov
2026-11-17 11:30   ` sashiko-bot
2026-11-17 11:15 ` [PATCH 2/3] usb: typec: tcpm: Leave SRC_VDM_IDENTITY_REQUEST whatever the cable answers Alexey Charkov
2026-11-17 11:39   ` sashiko-bot
2026-11-17 11:15 ` [PATCH 3/3] usb: typec: tcpm: Keep cable plug messages away from the port partner Alexey Charkov
2026-11-17 11:42   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox