Skip to content

Commit c94732b

Browse files
committed
thunderbolt: Increase runtime PM reference count on DP tunnel discovery
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: 6ac6fae ("thunderbolt: Add runtime PM for Software CM") Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
1 parent 781e14e commit c94732b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • drivers/thunderbolt

drivers/thunderbolt/tb.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ static void tb_discover_tunnels(struct tb_switch *sw)
138138
parent->boot = true;
139139
parent = tb_switch_parent(parent);
140140
}
141+
} else if (tb_tunnel_is_dp(tunnel)) {
142+
/* Keep the domain from powering down */
143+
pm_runtime_get_sync(&tunnel->src_port->sw->dev);
144+
pm_runtime_get_sync(&tunnel->dst_port->sw->dev);
141145
}
142146

143147
list_add_tail(&tunnel->list, &tcm->tunnel_list);

0 commit comments

Comments
 (0)