From 24a8a7279e1138d1315a8b2af992ec845d863d23 Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Tue, 19 Nov 2019 16:04:52 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1925667 Tested-by: Denis Brockus Reviewed-by: Denis Brockus --- chip/host/usb_pd_phy.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.1