summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/usbc/usb_pe_drp_sm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c
index d144f07ba7..1560eee817 100644
--- a/common/usbc/usb_pe_drp_sm.c
+++ b/common/usbc/usb_pe_drp_sm.c
@@ -1304,6 +1304,12 @@ static bool pe_attempt_port_discovery(int port)
pe[port].tx_type = TCPC_TX_SOP;
set_state_pe(port, PE_INIT_VDM_MODES_REQUEST);
return true;
+ } else if (pd_get_svids_discovery(port, TCPC_TX_SOP_PRIME)
+ == PD_DISC_NEEDED &&
+ pe_can_send_sop_prime(port)) {
+ pe[port].tx_type = TCPC_TX_SOP_PRIME;
+ set_state_pe(port, PE_INIT_VDM_SVIDS_REQUEST);
+ return true;
/*
* Note: determine if next VDM can be sent by taking advantage
* of discovery following the VDM command enum ordering.
@@ -4356,6 +4362,10 @@ static void pe_vdm_identity_request_cbl_exit(int port)
&& pe[port].discover_identity_timer > get_time().val)
pe[port].discover_identity_timer = get_time().val +
PD_T_DISCOVER_IDENTITY;
+
+ /* Do not attempt further discovery if identity discovery failed. */
+ if (pd_get_identity_discovery(port, TCPC_TX_SOP_PRIME) == PD_DISC_FAIL)
+ pd_set_svids_discovery(port, TCPC_TX_SOP_PRIME, PD_DISC_FAIL);
}
/**