diff options
author | Ayushee Shah <ayushee.shah@intel.com> | 2021-02-19 12:37:01 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-22 20:06:55 +0000 |
commit | 7e6d2aaf3bcc1c1876a678e462851689c7e16fe0 (patch) | |
tree | 0cec19737b2b8937b9c35ddf1e100a758861e6ab | |
parent | 4cbade0256c7eb43d214595f83f236d37bfc630e (diff) | |
download | chrome-ec-7e6d2aaf3bcc1c1876a678e462851689c7e16fe0.tar.gz |
Virtual mux: Set disconnect latch flag only in s3/s0ix
When the AP comes up after G3 and since the disconnect flag is
set, EC sends disconnect info to the AP probe functions. But the
DUT is still in low power mode thus the AP doesn't receive the
current mux state hence enumeration of USB4/TBT device fails when
hotplugged at G3. This CL ensures that disconnect flag is only
set in chipset suspend states i.e. s3 and s0ix
BUG=b:180377259
BRANCH=None
TEST=Connected USB4 device connect in G3 and checked enumeration
Signed-off-by: Ayushee Shah <ayushee.shah@intel.com>
Change-Id: I6992c528c7c39bf604d4e305b362ef04bc3c100e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2705561
Reviewed-by: Tanu Malhotra <tanu.malhotra@intel.com>
Reviewed-by: Madhusudanarao Amara <madhusudanarao.amara@intel.corp-partner.google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r-- | driver/usb_mux/usb_mux.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/driver/usb_mux/usb_mux.c b/driver/usb_mux/usb_mux.c index 6f2739de4a..c50189bb40 100644 --- a/driver/usb_mux/usb_mux.c +++ b/driver/usb_mux/usb_mux.c @@ -8,6 +8,7 @@ #include "atomic.h" #include "common.h" #include "console.h" +#include "chipset.h" #include "hooks.h" #include "host_command.h" #include "task.h" @@ -65,8 +66,9 @@ static int configure_mux(int port, *mux_state = USB_PD_MUX_NONE; } - if ((config == USB_MUX_SET_MODE && *mux_state == USB_PD_MUX_NONE) || - config == USB_MUX_INIT) { + if (chipset_in_state(CHIPSET_STATE_ANY_SUSPEND) && + ((config == USB_MUX_SET_MODE && *mux_state == USB_PD_MUX_NONE) || + config == USB_MUX_INIT)) { usb_mux_set_disconnect_latch_flag(port, true); } |