mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
pd: avoid re-sending discovery VDMs after power swap
Avoid re-sending discovery VDMs after power swap from source to sink. BUG=chrome-os-partner:40657 BRANCH=samus TEST=tested connecting samus to samus. tested power swapping back and forth and verify that we don't re-send discovery VDMs. Tested soft reset and verified that we don't re-send discovery VDMs. Tested hard reset and verified that we DO re-send discovery VDMs. Change-Id: Ib48c134f460eb776b7c6f5c1d86a5b56bb08ebcc Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/273420 Reviewed-by: Todd Broch <tbroch@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
dc065dcb31
commit
13df9780cb
@@ -1855,8 +1855,13 @@ void pd_task(void)
|
||||
typec_set_input_current_limit(
|
||||
port, typec_curr, TYPE_C_VOLTAGE);
|
||||
#endif
|
||||
/*
|
||||
* fake set data role swapped flag so we send
|
||||
* discover identity when we enter SRC_READY
|
||||
*/
|
||||
pd[port].flags |= PD_FLAGS_CHECK_PR_ROLE |
|
||||
PD_FLAGS_CHECK_DR_ROLE;
|
||||
PD_FLAGS_CHECK_DR_ROLE |
|
||||
PD_FLAGS_DATA_SWAPPED;
|
||||
set_state(port, PD_STATE_SNK_DISCOVERY);
|
||||
timeout = 10*MSEC;
|
||||
hook_call_deferred(
|
||||
@@ -1917,12 +1922,6 @@ void pd_task(void)
|
||||
/* Wait for source cap expired only if we are enabled */
|
||||
if ((pd[port].last_state != pd[port].task_state)
|
||||
&& pd_comm_enabled) {
|
||||
/*
|
||||
* fake set data role swapped flag so we send
|
||||
* discover identity when we enter SRC_READY
|
||||
*/
|
||||
pd[port].flags |= PD_FLAGS_DATA_SWAPPED;
|
||||
|
||||
/*
|
||||
* If we haven't passed hard reset counter,
|
||||
* start SinkWaitCapTimer, otherwise start
|
||||
|
||||
Reference in New Issue
Block a user