usb_pe_drp_sm: clear PE_FLAGS_PS_RESET_COMPLETE after reset complete

We should clear the PE_FLAGS_PS_RESET_COMPLETE after PE get the flag
, or this flag is always set.

BUG=none
BRANCH=none
TEST=on drawcia, console cmd "pd 0 hard" second times and later
     pe stays in pe_snk_transition_to_default_run state to wait
     PE_FLAGS_PS_RESET_COMPLETE set.

Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw>
Change-Id: I95c5a627e6b289d4405dc695eeaa97d369e1d92f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2577149
Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Ruibin Chang <Ruibin.Chang@ite.com.tw>
This commit is contained in:
Ruibin Chang 2020-12-07 15:47:56 +08:00 committed by Commit Bot
parent 803743a9de
commit 85ecd7589b
1 changed files with 1 additions and 1 deletions

View File

@ -3485,7 +3485,7 @@ static void pe_snk_transition_to_default_run(int port)
{
if (PE_CHK_FLAG(port, PE_FLAGS_PS_RESET_COMPLETE)) {
/* PE_SNK_Startup clears all flags */
PE_CLR_FLAG(port, PE_FLAGS_PS_RESET_COMPLETE);
/* Inform the Protocol Layer that the Hard Reset is complete */
prl_hard_reset_complete(port);
set_state_pe(port, PE_SNK_STARTUP);