提交 162af724 编写于 作者: M Mika Westerberg 提交者: Zheng Zengkai

thunderbolt: Increase runtime PM reference count on DP tunnel discovery

stable inclusion
from stable-5.10.26
commit 6c3c90058b95c70f9e001a1d82aaf53b50562a08
bugzilla: 51363

--------------------------------

commit c94732bd upstream.

If the driver is unbound and then bound back it goes over the topology
and figure out the existing tunnels. However, if it finds DP tunnel it
should make sure the domain does not runtime suspend as otherwise it
will tear down the DP tunnel unexpectedly.

Fixes: 6ac6faee ("thunderbolt: Add runtime PM for Software CM")
Cc: stable@vger.kernel.org
Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: N  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 8c7c95b1
...@@ -138,6 +138,10 @@ static void tb_discover_tunnels(struct tb_switch *sw) ...@@ -138,6 +138,10 @@ static void tb_discover_tunnels(struct tb_switch *sw)
parent->boot = true; parent->boot = true;
parent = tb_switch_parent(parent); parent = tb_switch_parent(parent);
} }
} else if (tb_tunnel_is_dp(tunnel)) {
/* Keep the domain from powering down */
pm_runtime_get_sync(&tunnel->src_port->sw->dev);
pm_runtime_get_sync(&tunnel->dst_port->sw->dev);
} }
list_add_tail(&tunnel->list, &tcm->tunnel_list); list_add_tail(&tunnel->list, &tcm->tunnel_list);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册