usb: pd: Fix sink hard reset looping bug
commit f2449fb6 ("usb: pd: Clear PD_IN_HARD_RESET in PE_SNK_TRANSITION_TO_DEFAULT") introduced a subtle bug by moving the clearing of the pd->hard_reset flag in sink mode to the PE_SNK_TRANSITION_TO_DEFAULT state. This caused a regression in which the state machine acts as if it had received a hard reset signal and infinitely loops back there. The cycle could only be broken if a physical disconnect happens. Fix this by renaming the flag to hard_reset_recvd and only using it when receiving, and not sending a hard reset. Change-Id: I04008d0bfc9a874e08b45f78a937004e9f37527d Signed-off-by:Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment