From 95c4379e37a0abea72dfd389cfe2c54452523690 Mon Sep 17 00:00:00 2001 From: Pooja Katiyar Date: Thu, 7 May 2026 14:46:30 -0700 Subject: [PATCH] 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 --- drivers/thunderbolt/switch.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index bfcab98faf4b2..ad0ec8f8ee281 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); -- 2.47.3