]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
thunderbolt: Don't disable lane adapter if XDomain lane bonding isn't possible
authorMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 11 Nov 2025 15:52:01 +0000 (17:52 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 5 May 2026 11:53:45 +0000 (13:53 +0200)
This happens when firmware connection manager is being used. It will
deal with disabling the lane 1 adapter after the tunnel has been
established and re-enabling it afterwards. For this reason only do this
when we know that lane bonding is possible (e.g running software
connection manager).

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/xdomain.c

index 754808c43f0067bd45c74afed29e4817b336192a..57367e18733a8c3e46c84dea01fcf9016730840b 100644 (file)
@@ -1931,7 +1931,13 @@ static void tb_xdomain_link_exit(struct tb_xdomain *xd)
        if (tb_port_get_link_generation(down) >= 4) {
                down->bonded = false;
                down->dual_link_port->bonded = false;
-       } else if (xd->link_width > TB_LINK_WIDTH_SINGLE) {
+               return;
+       }
+
+       if (!xd->bonding_possible)
+               return;
+
+       if (xd->link_width > TB_LINK_WIDTH_SINGLE) {
                /*
                 * Just return port structures back to way they were and
                 * update credits. No need to update userspace because