summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Lu <ken_lu@pegatron.corp-partner.google.com>2020-10-28 10:07:54 +0000
committerCommit Bot <commit-bot@chromium.org>2020-10-30 09:07:41 +0000
commitbd27fb95ed9857a97e4554bdda4a983c311ee8e9 (patch)
tree4ebd7837bbc83c5de3a819f1f893c80f9bbce4ee
parent9b1733d659d764140c825c0f32dab43de27410be (diff)
downloadchrome-ec-bd27fb95ed9857a97e4554bdda4a983c311ee8e9.tar.gz
Revert "hack: temporarily work around TX_COMPLETE failure"
This reverts commit bf411187b05aab57a9eb23c9a5b54f32b45aa2da. Reason for revert: PS8815 A1 firmware 0x0c fixes the TX_COMPLETE failure Original change's description: > hack: temporarily work around TX_COMPLETE failure > > After we removed the retry logic in the PRL layer, we uncovered an issue > that was being masked. On Delbin, the state machine is not receiving > that the PD messages (namely Request) is being sent successfully. We get > neither success or failure within 100ms. We still need to figure out and > fix this the root cause. > > This change just assumes that any sent PD traffic is successful after > 100ms (instead of a failure) for Delbin boards only. > > There is an upcoming build for Delbin that we will have power on > issues if we don't add some kind of power work around. This patch will > not allow the USB PD stack on Delbin to work properly in all scenarios; > this patch only aims to ensure that we can get power to the device to > test other non-PD functionality. > > This CL should be reverted within a two week time frame. > > BUG=b:164154200 > TEST=Delbin can power on > > Signed-off-by: Jett Rink <jettrink@chromium.org> > Change-Id: If6dce35dfd78ee3a70e6216a7b6bf62d3ded5646 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2376477 > Reviewed-by: Keith Short <keithshort@chromium.org> > Commit-Queue: Anson Tseng <ansontseng@google.com> > Tested-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> BUG: b:164154200 BRANCH=firmware-volteer-13521.B Change-Id: If475ba52dd3f128848ad263a34ebb9ce50b93bfb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2505389 Tested-by: Ken Lu <ken_lu@pegatron.corp-partner.google.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Ken Lu <ken_lu@pegatron.corp-partner.google.com>
-rw-r--r--common/usbc/usb_prl_sm.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/common/usbc/usb_prl_sm.c b/common/usbc/usb_prl_sm.c
index 4817d4e76f..c6db93376d 100644
--- a/common/usbc/usb_prl_sm.c
+++ b/common/usbc/usb_prl_sm.c
@@ -1010,13 +1010,6 @@ static void prl_tx_wait_for_phy_response_entry(const int port)
static void prl_tx_wait_for_phy_response_run(const int port)
{
- /*
- * TODO(b/164154200): Revert Change-Id
- * If6dce35dfd78ee3a70e6216a7b6bf62d3ded5646 workaround to support
- * validation for Delbin build.
- */
- const bool timed_out = get_time().val > prl_tx[port].tcpc_tx_timeout;
-
/* Wait until TX is complete */
/*
@@ -1026,8 +1019,7 @@ static void prl_tx_wait_for_phy_response_run(const int port)
* requirement.
*/
- if ((IS_ENABLED(BOARD_DELBIN) && timed_out) ||
- prl_tx[port].xmit_status == TCPC_TX_COMPLETE_SUCCESS) {
+ if (prl_tx[port].xmit_status == TCPC_TX_COMPLETE_SUCCESS) {
/* NOTE: PRL_TX_Message_Sent State embedded here. */
/* Increment messageId counter */
increment_msgid_counter(port);
@@ -1044,7 +1036,7 @@ static void prl_tx_wait_for_phy_response_run(const int port)
*/
task_wake(PD_PORT_TO_TASK_ID(port));
set_state_prl_tx(port, PRL_TX_WAIT_FOR_MESSAGE_REQUEST);
- } else if ((!IS_ENABLED(BOARD_DELBIN) && timed_out) ||
+ } else if (get_time().val > prl_tx[port].tcpc_tx_timeout ||
prl_tx[port].xmit_status == TCPC_TX_COMPLETE_FAILED ||
prl_tx[port].xmit_status == TCPC_TX_COMPLETE_DISCARDED) {
/*