From cd872d58f248bb02475f99e8e179bd6660418fbf Mon Sep 17 00:00:00 2001 From: Sam Hurst Date: Tue, 17 Apr 2018 10:01:39 -0700 Subject: [PATCH] TCPM: Prevent premature reading of PD Packets in FUSB302 driver After a successfully PD packet transmit, a PD_EVENT_RX is issued which could trigger a premature reading of a PD Packet before the entire packet is received. BUG=b:71620429 BRANCH=NONE TEST=manual Tested on Scarlet with the following three dongles: ASUS 3-1, (HDMI, USB, TYPEC): Tested with USB-Keyboard, TypeC power adapter, and HP monitor. Cable Matter 6-1, (DP, HDMI, USB, SVGA, ETHERNET, TYPEC): Tested with USB-Keyboard, TypeC power adapter, Ethernet and HP monitor (DP and HDMI). SVGA was not tested. Cable Matters 6-1, (DP, DP, USB, USB, ETHERNET, TYPEC): Tested with USB-Keyboard, USB-Mouse, Ethernet, and two HP monitors (Scarlet was mirrored on both monitors) Signed-off-by: Sam Hurst Change-Id: Ib07182201d954cf4b9616277f9c14bbbb337197e Reviewed-on: https://chromium-review.googlesource.com/1015417 Commit-Ready: Sam Hurst Tested-by: Sam Hurst Reviewed-by: Vincent Palatin --- driver/tcpm/fusb302.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/driver/tcpm/fusb302.c b/driver/tcpm/fusb302.c index f51e696bb9..f89f47896e 100644 --- a/driver/tcpm/fusb302.c +++ b/driver/tcpm/fusb302.c @@ -903,9 +903,6 @@ void fusb302_tcpc_alert(int port) /* GoodCRC was received, our FIFO is now non-empty */ if (interrupta & TCPC_REG_INTERRUPTA_TX_SUCCESS) { - task_set_event(PD_PORT_TO_TASK_ID(port), - PD_EVENT_RX, 0); - pd_transmit_complete(port, TCPC_TX_COMPLETE_SUCCESS); }