summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyushee <ayushee.shah@intel.com>2020-05-21 09:50:59 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-27 00:30:16 +0000
commit6789d685454c5163b30487a2e1c7e2213a446dbf (patch)
treee8d416d2aa4df1539c93655b940499d69726b898
parente6675aae6cf084a80317de56242338d1c5fa79ce (diff)
downloadchrome-ec-6789d685454c5163b30487a2e1c7e2213a446dbf.tar.gz
Virtual Mux: Send host events regardless of cached virtual mux state
Send host events on every virtual mux state update to avoid missed HPD events and role swap events in the kernel. BUG=b:157216436 BRANCH=None TEST=Able to see 5 consecutive HPD signals on the kernel console Signed-off-by: Ayushee <ayushee.shah@intel.com> Change-Id: Ifca3fbe3f04a08ad78daa3a562149e7ab075e078 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2212607 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--driver/usb_mux/virtual.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/driver/usb_mux/virtual.c b/driver/usb_mux/virtual.c
index 5a2f4a62d3..ac41686e1f 100644
--- a/driver/usb_mux/virtual.c
+++ b/driver/usb_mux/virtual.c
@@ -26,11 +26,9 @@ static mux_state_t virtual_mux_state[CONFIG_USB_PD_PORT_MAX_COUNT];
static inline void virtual_mux_update_state(int port, mux_state_t mux_state)
{
- if (virtual_mux_state[port] != mux_state) {
- virtual_mux_state[port] = mux_state;
+ virtual_mux_state[port] = mux_state;
- host_set_single_event(EC_HOST_EVENT_USB_MUX);
- }
+ host_set_single_event(EC_HOST_EVENT_USB_MUX);
}
static int virtual_init(const struct usb_mux *me)