From: Mika Westerberg Date: Fri, 1 Sep 2023 08:32:17 +0000 (+0300) Subject: thunderbolt: Check for unplugged router in tb_switch_clx_disable() X-Git-Tag: v6.7-rc1~74^2~11^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9e4f5b2af24297552017dd3d4db2379779701b6f;p=thirdparty%2Flinux.git thunderbolt: Check for unplugged router in tb_switch_clx_disable() There is no point disabling CL states if the router is unplugged so in that case return early. Signed-off-by: Mika Westerberg --- diff --git a/drivers/thunderbolt/clx.c b/drivers/thunderbolt/clx.c index c08b9cf0371e2..787dfd1550e5d 100644 --- a/drivers/thunderbolt/clx.c +++ b/drivers/thunderbolt/clx.c @@ -405,6 +405,9 @@ int tb_switch_clx_disable(struct tb_switch *sw) if (!clx) return 0; + if (sw->is_unplugged) + return clx; + up = tb_upstream_port(sw); down = tb_switch_downstream_port(sw);