usb: pd: Update PE_SNK_WAIT_FOR_CAPABILITIES state correctly
In PE_SNK_DISCOVERY, if a message is received make sure to update
the current state to PE_SNK_WAIT_FOR_CAPABILITIES before falling
through the switch case to handle it. Otherwise, when psy_changed()
is notified that vbus_present rises it may end up queuing the
state machine if it thinks it is still in PE_SNK_DISCOVERY. This
would cause the state machine to be reinvoked immediately when
it needs to instead wait for the Accept response. As a result,
it would prematurely send a hard reset.
Change-Id: Ib28c1da88324d2ab64cc943476f050f163112801
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment