From 1ef8bbc6c57f9aa7c07c4a11e30772e592442282 Mon Sep 17 00:00:00 2001 From: Denis Brockus Date: Fri, 8 Nov 2019 07:41:00 -0700 Subject: pd: Clear PE_FLAGS_PS_TRANSITION_TIMEOUT The flag was being checked for being set and then if it was set it was being set again. The pattern everywhere in this situation is to clear the flag and not set it again. Looks like a typo that was not caught BUG=none BRANCH=none TEST=make buildall -j Change-Id: I18f52343e0583cd0eecc509b01337ab60804130d Signed-off-by: Denis Brockus Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1906193 Reviewed-by: Jett Rink --- common/usbc/usb_pe_drp_sm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c index 88ba41e1c5..6bf72d3bff 100644 --- a/common/usbc/usb_pe_drp_sm.c +++ b/common/usbc/usb_pe_drp_sm.c @@ -2188,7 +2188,7 @@ static void pe_snk_hard_reset_entry(int port) * PSTransistionTimer timeout occurred. */ if (PE_CHK_FLAG(port, PE_FLAGS_PS_TRANSITION_TIMEOUT)) { - PE_SET_FLAG(port, PE_FLAGS_PS_TRANSITION_TIMEOUT); + PE_CLR_FLAG(port, PE_FLAGS_PS_TRANSITION_TIMEOUT); /* Transition Sink's power supply to the new power level */ pd_set_input_current_limit(port, pe[port].curr_limit, -- cgit v1.2.1