Revert "thunderbolt: Hide authorized attribute if router does not support PCIe tunnels"
Subsystems (2)
PATCH 1/1 Revert "thunderbolt: Hide authorized attribute if router does not support PCIe tunnels"
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.
--- drivers/thunderbolt/switch.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-)
drivers/thunderbolt/switch.c +1 -14
@@ -1875,18 +1875,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) {
@@ -1895,8 +1883,7 @@ static umode_t switch_attr_is_visible(struct kobject *kobj,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)
Signature · 1 line
2.30.2
Greg KH
maintainerQuoted 12 lines · Mika Westerberg
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.
Cc Christian Kellner <[email protected]>Signed-off-by Mika Westerberg <[email protected]>
Quoted 3 lines
--- drivers/thunderbolt/switch.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-)
Want me to take this in my "usb-linus" tree now to get it into the tree sooner? Or will you have other thunderbolt fixes for me soon?
thanks,
greg k-h
Quoted 17 lines · Greg KH
Quoted 12 lines · Mika Westerberg
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.
Cc Christian Kellner <[email protected]>Signed-off-by Mika Westerberg <[email protected]>Quoted 3 lines
--- drivers/thunderbolt/switch.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-)
Quoted 2 lines
Want me to take this in my "usb-linus" tree now to get it into the tree sooner? Or will you have other thunderbolt fixes for me soon?
I don't have any other fixes ATM so it would be great if you can pick this one directly :) Thanks!
Greg KH
maintainerQuoted 18 lines · Mika Westerberg
Quoted 17 lines · Greg KH
Quoted 15 lines · Mika Westerberg
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.
Cc Christian Kellner <[email protected]>Signed-off-by Mika Westerberg <[email protected]>--- drivers/thunderbolt/switch.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-)
Quoted 5 lines
Quoted 2 lines
Want me to take this in my "usb-linus" tree now to get it into the tree sooner? Or will you have other thunderbolt fixes for me soon?
I don't have any other fixes ATM so it would be great if you can pick this one directly :) Thanks!
Done!