summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyushee Shah <ayushee.shah@intel.com>2021-02-19 12:37:01 -0800
committerCommit Bot <commit-bot@chromium.org>2021-02-23 02:00:45 +0000
commit27da26cfd4eda142d36922dc7a966cbe006fc7bb (patch)
treef69c073a8ac45667120f4f784c354acc1ccc13e0
parentb7e0151f3c1b23e1d6142907b7bd4a61e5755ab9 (diff)
downloadchrome-ec-27da26cfd4eda142d36922dc7a966cbe006fc7bb.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> (cherry picked from commit 7e6d2aaf3bcc1c1876a678e462851689c7e16fe0) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2714263 Tested-by: Keith Short <keithshort@chromium.org>
-rw-r--r--driver/usb_mux/usb_mux.c6
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);
}