From: Pooja Katiyar Date: Thu, 7 May 2026 21:46:30 +0000 (-0700) Subject: thunderbolt: Don't access path config space on Lane 1 adapters in tb_switch_reset_host() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=95c4379e37a0abea72dfd389cfe2c54452523690;p=thirdparty%2Fkernel%2Fstable.git thunderbolt: Don't access path config space on Lane 1 adapters in tb_switch_reset_host() 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 Signed-off-by: Rene Sapiens Signed-off-by: Pooja Katiyar Signed-off-by: Mika Westerberg --- diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index bfcab98faf4b..ad0ec8f8ee28 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -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);