diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2021-01-11 09:11:15 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-20 10:37:14 +0000 |
commit | 8df726849d8d406ae011e014d899867b9c27685b (patch) | |
tree | b93139541577d461981e3a881285b338a4098559 | |
parent | 90237d36dee1fcb7694d5f3c1cd9b6c4ba37424a (diff) | |
download | chrome-ec-8df726849d8d406ae011e014d899867b9c27685b.tar.gz |
pd: fix RX re-enabling with the integrated PHY
When using the TCPC 'stub' to connect the TCPMv1 stack to the integrated
PD PHY, we were already re-enabling the RX after a Hard-reset but the
rx_enabled variable was not set in the TCPC code.
Update the stack code to call the rx_enable method as we already do with
regular TCPC, this ensures that the rx_enabled variable is always properly
set.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=b:168621142
BRANCH=servo
TEST=manual, send a hard-reset from the servo v4.1 and see the rest of
the sequence from the DUT happening properly.
Change-Id: I5b8c11d6778c40bb980f69ab0bb4c1619220e28e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2637648
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r-- | common/usb_pd_protocol.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index d3943ea0d0..2460902330 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -3459,7 +3459,7 @@ void pd_task(void *u) set_state(port, PD_STATE_SRC_DISCONNECTED); break; } -#ifdef CONFIG_USB_PD_TCPM_TCPCI +#if defined(CONFIG_USB_PD_TCPM_TCPCI) || defined(CONFIG_USB_PD_TCPM_STUB) /* * After transmitting hard reset, TCPM writes * to RECEIVE_DETECT register to enable @@ -3467,7 +3467,7 @@ void pd_task(void *u) */ if (pd_comm_is_enabled(port)) tcpm_set_rx_enable(port, 1); -#endif /* CONFIG_USB_PD_TCPM_TCPCI */ +#endif /* CONFIG_USB_PD_TCPM_TCPCI || CONFIG_USB_PD_TCPM_STUB */ set_state(port, PD_STATE_SRC_STARTUP); break; @@ -4119,7 +4119,7 @@ void pd_task(void *u) /* Wait for source cap expired only if we are enabled */ if ((pd[port].last_state != pd[port].task_state) && pd_comm_is_enabled(port)) { -#ifdef CONFIG_USB_PD_TCPM_TCPCI +#if defined(CONFIG_USB_PD_TCPM_TCPCI) || defined(CONFIG_USB_PD_TCPM_STUB) /* * If we come from hard reset recover state, * then we can process the source capabilities @@ -4129,7 +4129,7 @@ void pd_task(void *u) if (pd[port].last_state == PD_STATE_SNK_HARD_RESET_RECOVER) tcpm_set_rx_enable(port, 1); -#endif /* CONFIG_USB_PD_TCPM_TCPCI */ +#endif /* CONFIG_USB_PD_TCPM_TCPCI || CONFIG_USB_PD_TCPM_STUB */ #ifdef CONFIG_USB_PD_RESET_MIN_BATT_SOC /* * If the battery has not met a configured safe |