Skip to content

Commit 2b8c956

Browse files
Badhri Jagan Sridharangregkh
authored andcommitted
usb: typec: tcpm: Skip sink_cap query only when VDM sm is busy
When port partner responds "Not supported" to the DiscIdentity command, VDM state machine can remain in NVDM_STATE_ERR_TMOUT and this causes querying sink cap to be skipped indefinitely. Hence check for vdm_sm_running instead of checking for VDM_STATE_DONE. Fixes: 8dc4bd0 ("usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS)") Acked-by: Heikki Krogerus <[email protected]> Signed-off-by: Badhri Jagan Sridharan <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f09ddcf commit 2b8c956

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/typec/tcpm/tcpm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5173,7 +5173,7 @@ static void tcpm_enable_frs_work(struct kthread_work *work)
51735173
goto unlock;
51745174

51755175
/* Send when the state machine is idle */
5176-
if (port->state != SNK_READY || port->vdm_state != VDM_STATE_DONE || port->send_discover)
5176+
if (port->state != SNK_READY || port->vdm_sm_running || port->send_discover)
51775177
goto resched;
51785178

51795179
port->upcoming_state = GET_SINK_CAP;

0 commit comments

Comments
 (0)