From: Mika Westerberg Date: Wed, 31 Jan 2024 09:12:59 +0000 (+0200) Subject: thunderbolt: Reset only non-USB4 host routers in resume X-Git-Tag: v6.6.29~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c67f926ec870e96a704d7971d429d8e5c98d8f50;p=thirdparty%2Fkernel%2Fstable.git thunderbolt: Reset only non-USB4 host routers in resume commit 8cf9926c537ce8b0c7783afebe752e084765d553 upstream. There is no need to reset the USB4 host routers on resume because they are reset already and this may cause problems if the link does not come up soon enough. For this reason limit this to happen in non-USB4 host routers only (that's Apple systems with Intel Thunderbolt controllers). Fixes: 59a54c5f3dbd ("thunderbolt: Reset topology created by the boot firmware") Cc: Sanath S Reviewed-by: Mario Limonciello Signed-off-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c index 00d07e1fb592b..c5e10c1d4c383 100644 --- a/drivers/thunderbolt/tb.c +++ b/drivers/thunderbolt/tb.c @@ -2259,8 +2259,12 @@ static int tb_resume_noirq(struct tb *tb) tb_dbg(tb, "resuming...\n"); - /* remove any pci devices the firmware might have setup */ - tb_switch_reset(tb->root_switch); + /* + * For non-USB4 hosts (Apple systems) remove any PCIe devices + * the firmware might have setup. + */ + if (!tb_switch_is_usb4(tb->root_switch)) + tb_switch_reset(tb->root_switch); tb_switch_resume(tb->root_switch, false); tb_free_invalid_tunnels(tb);