]> www.infradead.org Git - users/hch/misc.git/commit
usb: typec: tcpm: fix state transition for SNK_WAIT_CAPABILITIES state in run_state_m...
authorAmit Sunil Dhamne <amitsd@google.com>
Tue, 11 Mar 2025 02:19:07 +0000 (19:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Mar 2025 08:15:20 +0000 (09:15 +0100)
commitf2865c6300d75a9f187dd7918d248e010970fd44
treeb26017ee86724ca9c36184c3653135f1f006a62c
parentc44e3d3cdb74c066ece370d66021b9ebff315c9a
usb: typec: tcpm: fix state transition for SNK_WAIT_CAPABILITIES state in run_state_machine()

A subtle error got introduced while manually fixing merge conflict in
tcpm.c for commit 85c4efbe6088 ("Merge v6.12-rc6 into usb-next"). As a
result of this error, the next state is unconditionally set to
SNK_WAIT_CAPABILITIES_TIMEOUT while handling SNK_WAIT_CAPABILITIES state
in run_state_machine(...).

Fix this by setting new state of TCPM state machine to `upcoming_state`
(that is set to different values based on conditions).

Cc: stable@vger.kernel.org
Fixes: 85c4efbe60888 ("Merge v6.12-rc6 into usb-next")
Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250310-fix-snk-wait-timeout-v6-14-rc6-v1-1-5db14475798f@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c