diff options
Diffstat (limited to 'common/usbc/tbt_alt_mode.c')
-rw-r--r-- | common/usbc/tbt_alt_mode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/common/usbc/tbt_alt_mode.c b/common/usbc/tbt_alt_mode.c index de296aa216..fdee453904 100644 --- a/common/usbc/tbt_alt_mode.c +++ b/common/usbc/tbt_alt_mode.c @@ -138,6 +138,11 @@ bool tbt_cable_entry_is_done(int port) static void tbt_exit_done(int port) { + /* + * If the EC exits an alt mode autonomously, don't try to enter it again. If + * the AP commands the EC to exit DP mode, it might command the EC to enter + * again later, so leave the state machine ready for that possibility. + */ tbt_state[port] = IS_ENABLED(CONFIG_USB_PD_REQUIRE_AP_MODE_ENTRY) ? TBT_START : TBT_INACTIVE; TBT_CLR_FLAG(port, TBT_FLAG_RETRY_DONE); @@ -385,9 +390,7 @@ void intel_vdm_naked(int port, enum tcpm_transmit_type type, uint8_t vdm_cmd) tbt_active_cable_exit_mode(port); else { tbt_prints("exit mode SOP failed", port); - tbt_state[port] = - IS_ENABLED(CONFIG_USB_PD_REQUIRE_AP_MODE_ENTRY) - ? TBT_START : TBT_INACTIVE; + tbt_state[port] = TBT_INACTIVE; TBT_CLR_FLAG(port, TBT_FLAG_RETRY_DONE); } break; |