diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2024-02-02 16:38:19 +0200 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2024-02-13 11:08:36 +0200 |
commit | 6faa39eea95372e9f235ab8280fa512618655f26 (patch) | |
tree | 916a41e334b97df9ca25fc558747f619f05891c2 /drivers/thunderbolt/tb.c | |
parent | 8cf9926c537ce8b0c7783afebe752e084765d553 (diff) |
thunderbolt: Skip discovery also in USB4 v2 host
If the host router is reset, there is no point running discovery as the
links are down. Furthermore this prevents CL-state enabling. For this
reason skip discovery in USB4 v2 host the same way we do with USB4 v1.
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tb.c')
-rw-r--r-- | drivers/thunderbolt/tb.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c index f127088b6ebd..64dd22e1f5b2 100644 --- a/drivers/thunderbolt/tb.c +++ b/drivers/thunderbolt/tb.c @@ -2584,6 +2584,7 @@ static int tb_scan_finalize_switch(struct device *dev, void *data) static int tb_start(struct tb *tb, bool reset) { struct tb_cm *tcm = tb_priv(tb); + bool discover = true; int ret; tb->root_switch = tb_switch_alloc(tb, &tb->dev, 0); @@ -2629,9 +2630,13 @@ static int tb_start(struct tb *tb, bool reset) * reset the ports to handle it as new hotplug for USB4 v1 * routers (for USB4 v2 and beyond we already do host reset). */ - if (reset && usb4_switch_version(tb->root_switch) == 1) { - tb_switch_reset(tb->root_switch); - } else { + if (reset && tb_switch_is_usb4(tb->root_switch)) { + discover = false; + if (usb4_switch_version(tb->root_switch) == 1) + tb_switch_reset(tb->root_switch); + } + + if (discover) { /* Full scan to discover devices added before the driver was loaded. */ tb_scan_switch(tb->root_switch); /* Find out tunnels created by the boot firmware */ |