diff options
Diffstat (limited to 'common/usbc/usb_pe_drp_sm.c')
-rw-r--r-- | common/usbc/usb_pe_drp_sm.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c index b883351d84..985a9ea531 100644 --- a/common/usbc/usb_pe_drp_sm.c +++ b/common/usbc/usb_pe_drp_sm.c @@ -886,10 +886,17 @@ void pe_got_hard_reset(int port) * Called by the handler that detects the FRS signal in order to * switch PE states to complete the FRS that the hardware has * started. + * + * If the PE is not running, generate an error recovery to turn off + * Vbus and get the port back into a known state. */ void pd_got_frs_signal(int port) { - PE_SET_FLAG(port, PE_FLAGS_FAST_ROLE_SWAP_SIGNALED); + if (pe_is_running(port)) + PE_SET_FLAG(port, PE_FLAGS_FAST_ROLE_SWAP_SIGNALED); + else + pd_set_error_recovery(port); + task_wake(PD_PORT_TO_TASK_ID(port)); } #endif /* CONFIG_USB_PD_REV30 */ |