From 5234aef34873c8d8397de7dee09ac6d24b4a7298 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 9 Aug 2021 12:03:27 +0200 Subject: [PATCH] 5.13-stable patches added patches: revert-thunderbolt-hide-authorized-attribute-if-router-does-not-support-pcie-tunnels.patch --- ...router-does-not-support-pcie-tunnels.patch | 59 +++++++++++++++++++ queue-5.13/series | 1 + 2 files changed, 60 insertions(+) create mode 100644 queue-5.13/revert-thunderbolt-hide-authorized-attribute-if-router-does-not-support-pcie-tunnels.patch diff --git a/queue-5.13/revert-thunderbolt-hide-authorized-attribute-if-router-does-not-support-pcie-tunnels.patch b/queue-5.13/revert-thunderbolt-hide-authorized-attribute-if-router-does-not-support-pcie-tunnels.patch new file mode 100644 index 00000000000..d5c4ccc0355 --- /dev/null +++ b/queue-5.13/revert-thunderbolt-hide-authorized-attribute-if-router-does-not-support-pcie-tunnels.patch @@ -0,0 +1,59 @@ +From 8e3341257e3b5774ec8cd3ef1ba0c0d3fada322b Mon Sep 17 00:00:00 2001 +From: Mika Westerberg +Date: Tue, 27 Jul 2021 17:25:01 +0300 +Subject: Revert "thunderbolt: Hide authorized attribute if router does not support PCIe tunnels" + +From: Mika Westerberg + +commit 8e3341257e3b5774ec8cd3ef1ba0c0d3fada322b upstream. + +This reverts commit 6f3badead6a078cf3c71f381f9d84ac922984a00. + +It turns out bolt depends on having authorized attribute visible under +each device. Hiding it makes bolt crash as several people have reported +on various bug trackers. For this reason revert the commit. + +Link: https://gitlab.freedesktop.org/bolt/bolt/-/issues/174 +Link: https://bugzilla.redhat.com/show_bug.cgi?id=1979765 +Link: https://bugs.archlinux.org/task/71569 +Cc: stable@vger.kernel.org +Cc: Christian Kellner +Fixes: 6f3badead6a0 ("thunderbolt: Hide authorized attribute if router does not support PCIe tunnels") +Signed-off-by: Mika Westerberg +Link: https://lore.kernel.org/r/20210727142501.27476-1-mika.westerberg@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/thunderbolt/switch.c | 15 +-------------- + 1 file changed, 1 insertion(+), 14 deletions(-) + +--- a/drivers/thunderbolt/switch.c ++++ b/drivers/thunderbolt/switch.c +@@ -1740,18 +1740,6 @@ static struct attribute *switch_attrs[] + NULL, + }; + +-static bool has_port(const struct tb_switch *sw, enum tb_port_type type) +-{ +- const struct tb_port *port; +- +- tb_switch_for_each_port(sw, port) { +- if (!port->disabled && port->config.type == type) +- return true; +- } +- +- return false; +-} +- + static umode_t switch_attr_is_visible(struct kobject *kobj, + struct attribute *attr, int n) + { +@@ -1760,8 +1748,7 @@ static umode_t switch_attr_is_visible(st + + if (attr == &dev_attr_authorized.attr) { + if (sw->tb->security_level == TB_SECURITY_NOPCIE || +- sw->tb->security_level == TB_SECURITY_DPONLY || +- !has_port(sw, TB_TYPE_PCIE_UP)) ++ sw->tb->security_level == TB_SECURITY_DPONLY) + return 0; + } else if (attr == &dev_attr_device.attr) { + if (!sw->device) diff --git a/queue-5.13/series b/queue-5.13/series index bb3ad0ffff3..bd379a3c208 100644 --- a/queue-5.13/series +++ b/queue-5.13/series @@ -120,3 +120,4 @@ drivers-core-fix-oops-when-driver-probe-fails.patch media-rtl28xxu-fix-zero-length-control-request.patch pipe-increase-minimum-default-pipe-size-to-2-pages.patch ext4-fix-potential-htree-corruption-when-growing-large_dir-directories.patch +revert-thunderbolt-hide-authorized-attribute-if-router-does-not-support-pcie-tunnels.patch -- 2.47.3