summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2023-01-17 16:49:03 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-01-25 20:35:28 +0000
commit4a475bcaf766d46feb9e7ef8c585d6f6336a485b (patch)
treede007ba30266d2f26c7c9e94f9167aca2787242f /common
parentd83b8aa7fd9f502c3cad258d60424075716fc6da (diff)
downloadchrome-ec-4a475bcaf766d46feb9e7ef8c585d6f6336a485b.tar.gz
TCPMv2: Clear DPM state on disconnect
When a partner disconnects, clear the DPM state so stale data from it won't be presented to the AP. BRANCH=None BUG=b:208884535 TEST=./twister -T ./zephyr/test Change-Id: Idf800b6c5c223e67c72c2124fb111fad27ce6361 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4179363 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/usbc/usb_pe_drp_sm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c
index f1bf22afa2..0aff4feaaf 100644
--- a/common/usbc/usb_pe_drp_sm.c
+++ b/common/usbc/usb_pe_drp_sm.c
@@ -1432,6 +1432,7 @@ static void pe_clear_port_data(int port)
dpm_remove_sink(port);
dpm_remove_source(port);
+ dpm_init(port);
/* Exit BIST Test mode, in case the TCPC entered it. */
tcpc_set_bist_test_mode(port, false);