summaryrefslogtreecommitdiff
path: root/common/usbc/usb_pe_drp_sm.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/usbc/usb_pe_drp_sm.c')
-rw-r--r--common/usbc/usb_pe_drp_sm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c
index aa7812bbed..defeebecfa 100644
--- a/common/usbc/usb_pe_drp_sm.c
+++ b/common/usbc/usb_pe_drp_sm.c
@@ -5020,14 +5020,18 @@ __maybe_unused static void pe_frs_snk_src_start_ams_entry(int port)
print_current_state(port);
- /* Contract is invalid now */
- pe_invalidate_explicit_contract(port);
-
/* Inform Protocol Layer this is start of AMS */
PE_SET_FLAG(port, PE_FLAGS_LOCALLY_INITIATED_AMS);
/* Shared PRS/FRS code, indicate FRS path */
PE_SET_FLAG(port, PE_FLAGS_FAST_ROLE_SWAP_PATH);
+
+ /*
+ * Invalidate the contract after the FRS flags set so the
+ * flags can be propagated to this function.
+ */
+ pe_invalidate_explicit_contract(port);
+
set_state_pe(port, PE_PRS_SNK_SRC_SEND_SWAP);
}