]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
thunderbolt: Don't access path config space on Lane 1 adapters in tb_switch_reset_host()
authorPooja Katiyar <pooja.katiyar@intel.com>
Thu, 7 May 2026 21:46:30 +0000 (14:46 -0700)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 20 May 2026 09:54:34 +0000 (11:54 +0200)
USB4 Lane 1 adapters do not have accessible path config space. Skip the
path config space cleanup in tb_switch_reset_host() for these ports. The
check is for USB4 switches only. Thunderbolt 1-3 Lane 1 adapters stay as
is because we do need to program their path config space.

Co-developed-by: Rene Sapiens <rene.sapiens@linux.intel.com>
Signed-off-by: Rene Sapiens <rene.sapiens@linux.intel.com>
Signed-off-by: Pooja Katiyar <pooja.katiyar@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/switch.c

index bfcab98faf4b23ff90dc347fd7c0fa8b313196fe..ad0ec8f8ee28177bbcd2a1bdf853fada1302cf5a 100644 (file)
@@ -1620,6 +1620,12 @@ static int tb_switch_reset_host(struct tb_switch *sw)
                                ret = tb_port_reset(port);
                                if (ret)
                                        return ret;
+                               /*
+                                * USB4 Lane 1 adapters do not have accessible
+                                * path config space.
+                                */
+                               if (tb_switch_is_usb4(sw) && !port->usb4)
+                                       continue;
                        } else if (tb_port_is_usb3_down(port) ||
                                   tb_port_is_usb3_up(port)) {
                                tb_usb3_port_enable(port, false);