Skip to content

Commit cefa1b4

Browse files
committed
Revert "thunderbolt: Hide authorized attribute if router does not support PCIe tunnels"
This reverts commit 6f3bade.
1 parent 5b892ca commit cefa1b4

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

drivers/thunderbolt/switch.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,18 +1740,6 @@ static struct attribute *switch_attrs[] = {
17401740
NULL,
17411741
};
17421742

1743-
static bool has_port(const struct tb_switch *sw, enum tb_port_type type)
1744-
{
1745-
const struct tb_port *port;
1746-
1747-
tb_switch_for_each_port(sw, port) {
1748-
if (!port->disabled && port->config.type == type)
1749-
return true;
1750-
}
1751-
1752-
return false;
1753-
}
1754-
17551743
static umode_t switch_attr_is_visible(struct kobject *kobj,
17561744
struct attribute *attr, int n)
17571745
{
@@ -1760,8 +1748,7 @@ static umode_t switch_attr_is_visible(struct kobject *kobj,
17601748

17611749
if (attr == &dev_attr_authorized.attr) {
17621750
if (sw->tb->security_level == TB_SECURITY_NOPCIE ||
1763-
sw->tb->security_level == TB_SECURITY_DPONLY ||
1764-
!has_port(sw, TB_TYPE_PCIE_UP))
1751+
sw->tb->security_level == TB_SECURITY_DPONLY)
17651752
return 0;
17661753
} else if (attr == &dev_attr_device.attr) {
17671754
if (!sw->device)

0 commit comments

Comments
 (0)