From: Greg Kroah-Hartman Date: Fri, 11 Nov 2022 08:51:11 +0000 (+0100) Subject: 6.0-stable patches X-Git-Tag: v5.10.155~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7094f0872ad4b6771e8e1502c65fdb3ab51a910d;p=thirdparty%2Fkernel%2Fstable-queue.git 6.0-stable patches added patches: thunderbolt-add-dp-out-resource-when-dp-tunnel-is-discovered.patch --- diff --git a/queue-5.15/series b/queue-5.15/series new file mode 100644 index 00000000000..a1bba147fbd --- /dev/null +++ b/queue-5.15/series @@ -0,0 +1,2 @@ +thunderbolt-tear-down-existing-tunnels-when-resuming-from-hibernate.patch +thunderbolt-add-dp-out-resource-when-dp-tunnel-is-discovered.patch diff --git a/queue-6.0/series b/queue-6.0/series new file mode 100644 index 00000000000..2e33cbdfb59 --- /dev/null +++ b/queue-6.0/series @@ -0,0 +1 @@ +thunderbolt-add-dp-out-resource-when-dp-tunnel-is-discovered.patch diff --git a/queue-6.0/thunderbolt-add-dp-out-resource-when-dp-tunnel-is-discovered.patch b/queue-6.0/thunderbolt-add-dp-out-resource-when-dp-tunnel-is-discovered.patch new file mode 100644 index 00000000000..41d8171e417 --- /dev/null +++ b/queue-6.0/thunderbolt-add-dp-out-resource-when-dp-tunnel-is-discovered.patch @@ -0,0 +1,70 @@ +From b60e31bf18a7064032dbcb73dcb5b58f8a00a110 Mon Sep 17 00:00:00 2001 +From: Sanjay R Mehta +Date: Thu, 4 Aug 2022 05:48:38 -0500 +Subject: thunderbolt: Add DP OUT resource when DP tunnel is discovered + +From: Sanjay R Mehta + +commit b60e31bf18a7064032dbcb73dcb5b58f8a00a110 upstream. + +If the boot firmware implements a connection manager of its own it may +create a DisplayPort tunnel and will be handed off to Linux connection +manager, but the DP OUT resource is not saved in the dp_resource list. + +This patch adds tunnelled DP OUT port to the dp_resource list once the +DP tunnel is discovered. + +Signed-off-by: Sanjay R Mehta +Signed-off-by: Basavaraj Natikar +Tested-by: Renjith Pananchikkal +Signed-off-by: Mika Westerberg +Cc: "Limonciello, Mario" +Signed-off-by: Greg Kroah-Hartman +--- + drivers/thunderbolt/tb.c | 28 ++++++++++++++++++++++++++++ + 1 file changed, 28 insertions(+) + +--- a/drivers/thunderbolt/tb.c ++++ b/drivers/thunderbolt/tb.c +@@ -105,6 +105,32 @@ static void tb_remove_dp_resources(struc + } + } + ++static void tb_discover_dp_resource(struct tb *tb, struct tb_port *port) ++{ ++ struct tb_cm *tcm = tb_priv(tb); ++ struct tb_port *p; ++ ++ list_for_each_entry(p, &tcm->dp_resources, list) { ++ if (p == port) ++ return; ++ } ++ ++ tb_port_dbg(port, "DP %s resource available discovered\n", ++ tb_port_is_dpin(port) ? "IN" : "OUT"); ++ list_add_tail(&port->list, &tcm->dp_resources); ++} ++ ++static void tb_discover_dp_resources(struct tb *tb) ++{ ++ struct tb_cm *tcm = tb_priv(tb); ++ struct tb_tunnel *tunnel; ++ ++ list_for_each_entry(tunnel, &tcm->tunnel_list, list) { ++ if (tb_tunnel_is_dp(tunnel)) ++ tb_discover_dp_resource(tb, tunnel->dst_port); ++ } ++} ++ + static void tb_switch_discover_tunnels(struct tb_switch *sw, + struct list_head *list, + bool alloc_hopids) +@@ -1446,6 +1472,8 @@ static int tb_start(struct tb *tb) + tb_scan_switch(tb->root_switch); + /* Find out tunnels created by the boot firmware */ + tb_discover_tunnels(tb); ++ /* Add DP resources from the DP tunnels created by the boot firmware */ ++ tb_discover_dp_resources(tb); + /* + * If the boot firmware did not create USB 3.x tunnels create them + * now for the whole topology.