summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-11-19 16:04:52 -0700
committerCommit Bot <commit-bot@chromium.org>2019-11-21 21:57:50 +0000
commit24a8a7279e1138d1315a8b2af992ec845d863d23 (patch)
tree8fa5e47b6e8e2713ca8756aee1709873e809639d
parentcdfc04f0d6e244a892df68a241d999915920b581 (diff)
downloadchrome-ec-24a8a7279e1138d1315a8b2af992ec845d863d23.tar.gz
testing: remove incorrect testing assert
When we go through the suspend code path, we disabled RX monitoring, and we have done that for a 4+ years. We have not had a unit test for that ever. One is come that needs this BRANCH=none BUG=b:144369187 TEST=See that disabling RX in set_state no longer causes assertion failures in tests that it shouldn't. Change-Id: Iab4b44d3f5fdd1fe8657b23ac59df247a384ee32 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1925667 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r--chip/host/usb_pd_phy.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/chip/host/usb_pd_phy.c b/chip/host/usb_pd_phy.c
index 0ca92604b8..347035a6d0 100644
--- a/chip/host/usb_pd_phy.c
+++ b/chip/host/usb_pd_phy.c
@@ -343,7 +343,13 @@ void pd_rx_enable_monitoring(int port)
void pd_rx_disable_monitoring(int port)
{
- ASSERT(pd_phy[port].hw_init_done);
+ /*
+ * We disabled RX monitoring in TCPMv1 in set_state when
+ * transitioning from suspended to disconnected, but we only
+ * reinitialize after we have fully transitioned to disconnected. Don't
+ * assert that hw_init_done here since we have "valid" code that
+ * requires hw_init_done to be false when a port is suspended.
+ */
pd_phy[port].rx_monitoring = 0;
}