diff options
author | Eric Herrmann <eherrmann@chromium.org> | 2021-01-12 12:41:52 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-20 21:44:51 +0000 |
commit | 2e830d3145fe6b6a9faf377c38a4066a930f23ba (patch) | |
tree | 41241a5b7509328aaf658d309805223850c00b07 /common/usbc/usb_prl_sm.c | |
parent | 2eae769ad34ceaae5ce770beae546724801f4ef8 (diff) | |
download | chrome-ec-2e830d3145fe6b6a9faf377c38a4066a930f23ba.tar.gz |
TCPMv2: Do not check for SinkTxOk in FRS-Mode
After an FRS signal, the initial sink will attempt to initiate the FR
Swap AMS, and the initial source should apply SinkTxOk. If the initial
source is removed entirely, FRS will be triggered butSinkTxOk will
never be applied and this will get the initial sink state machine stuck.
So, in the case of an FRS ignore the CC voltage. After an FRS signal,
the source isn't allowed to initiate an AMS.
BUG=b:171740860
TEST=On Volteer with the PS8815, enable FRS and remove the FRS device.
Make sure we enter ErrorRecovery instead of hanging in
PE_PRS_SNK_SRC_Send_Swap
TEST=make buildall
BRANCH=none
Change-Id: I8373a76c0c19feeb909b0623a1ae2d6b0ad5fa60
Signed-off-by: Eric Herrmann <eherrmann@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2633654
Commit-Queue: Diana Z <dzigterman@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'common/usbc/usb_prl_sm.c')
-rw-r--r-- | common/usbc/usb_prl_sm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/common/usbc/usb_prl_sm.c b/common/usbc/usb_prl_sm.c index dabc6a269d..20f53ddb96 100644 --- a/common/usbc/usb_prl_sm.c +++ b/common/usbc/usb_prl_sm.c @@ -1204,9 +1204,15 @@ static void prl_tx_snk_pending_run(const int port) { enum tcpc_cc_voltage_status cc1, cc2; - /* Wait unit the SRC applies SINK_TX_OK so we can transmit */ + /* + * Wait unit the SRC applies SINK_TX_OK so we can transmit. In FRS mode, + * don't wait for SINK_TX_OK since either the source (and Rp) could be + * gone or the TCPC CC_STATUS update time could be too long to meet + * tFRSwapInit. + */ tcpm_get_cc(port, &cc1, &cc2); - if (cc1 == TYPEC_CC_VOLT_RP_3_0 || cc2 == TYPEC_CC_VOLT_RP_3_0) { + if (cc1 == TYPEC_CC_VOLT_RP_3_0 || cc2 == TYPEC_CC_VOLT_RP_3_0 || + pe_in_frs_mode(port)) { /* * We clear the pending XMIT flag here right before we send so * we can detect if we discarded this message or not |