of: property: Disable fw_devlink DT support for X86
PATCH 1/1 of: property: Disable fw_devlink DT support for X86
Andre reported fw_devlink=on breaking OLPC XO-1.5 [1].
OLPC XO-1.5 is an X86 system that uses a mix of ACPI and OF to populate devices. The root cause seems to be ISA devices not setting their fwnode field. But trying to figure out how to fix that doesn't seem worth the trouble because the OLPC devicetree is very sparse/limited and fw_devlink only adds the links causing this issue. Considering that there aren't many users of OF in an X86 system, simply fw_devlink DT support for X86.
[1] - https://lore.kernel.org/lkml/[email protected]/
--- drivers/of/property.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/of/property.c +3 -0
@@ -1444,6 +1444,9 @@ static int of_fwnode_add_links(struct fwnode_handle *fwnode)struct property *p;struct device_node *con_np =to_of_node (fwnode); +if (IS_ENABLED (CONFIG_X86 )) +return 0 ; +if (!con_np)return -EINVAL ;
Signature · 1 line
2.33.0.309.g3052b89438-goog
Quoted 22 lines · Saravana Kannan
Andre reported fw_devlink=on breaking OLPC XO-1.5 [1].
OLPC XO-1.5 is an X86 system that uses a mix of ACPI and OF to populate devices. The root cause seems to be ISA devices not setting their fwnode field. But trying to figure out how to fix that doesn't seem worth the trouble because the OLPC devicetree is very sparse/limited and
fw_devlinkonly adds the links causing this issue. Considering that there aren't many users of OF in an X86 system, simplyfw_devlinkDT support for X86.[1] - https://lore.kernel.org/lkml/[email protected]/
Fixes ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""")Signed-off-by Saravana Kannan <[email protected]>Cc Andre Muller <[email protected]>--- drivers/of/property.c | 3 +++ 1 file changed, 3 insertions(+)drivers/of/property.c +0
-0
drivers/of/property.c static int of_fwnode_add_links(struct fwnode_handle *fwnode) · line 1448
Quoted 5 lines
drivers/of/property.c +2
-0@@ -1444,6 +1444,9 @@ static int of_fwnode_add_links(struct fwnode_handle *fwnode)struct property *p;struct device_node *con_np =to_of_node (fwnode); +if (IS_ENABLED (CONFIG_X86 )) +return 0 ;
I love it :)
Anyway, getting a "Tested-by:" would be great to have here. Andre, can you verify this solves your issue?
thanks,
greg k-h
Andre Muller
Tested-byQuoted 26 lines · Greg Kroah-Hartman
Quoted 25 lines · Saravana Kannan
Andre reported fw_devlink=on breaking OLPC XO-1.5 [1].
OLPC XO-1.5 is an X86 system that uses a mix of ACPI and OF to populate devices. The root cause seems to be ISA devices not setting their fwnode field. But trying to figure out how to fix that doesn't seem worth the trouble because the OLPC devicetree is very sparse/limited and
fw_devlinkonly adds the links causing this issue. Considering that there aren't many users of OF in an X86 system, simplyfw_devlinkDT support for X86.[1] - https://lore.kernel.org/lkml/[email protected]/
Fixes ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""")Signed-off-by Saravana Kannan <[email protected]>Cc Andre Muller <[email protected]>--- drivers/of/property.c | 3 +++ 1 file changed, 3 insertions(+)drivers/of/property.c +0
-0@@ -1444,6 +1444,9 @@ static int of_fwnode_add_links(struct fwnode_handle *fwnode)struct property *p;struct device_node *con_np =to_of_node (fwnode);
Quoted 7 lines
drivers/of/property.c static int of_fwnode_add_links(struct fwnode_handle *fwnode) · line 1448
Quoted 2 lines
drivers/of/property.c +2
-0+if (IS_ENABLED (CONFIG_X86 )) +return 0 ;I love it :)
Anyway, getting a "Tested-by:" would be great to have here. Andre, can you verify this solves your issue?
Yes, this patch fixes the issue, the drives work fine.
Thanks all,
Andre
Quoted 5 lines
thanks,
greg k-h
Greg Kroah-Hartman
Acked-byQuoted 32 lines · Andre Muller
Quoted 31 lines · Greg Kroah-Hartman
Quoted 22 lines · Saravana Kannan
Andre reported fw_devlink=on breaking OLPC XO-1.5 [1].
OLPC XO-1.5 is an X86 system that uses a mix of ACPI and OF to populate devices. The root cause seems to be ISA devices not setting their fwnode field. But trying to figure out how to fix that doesn't seem worth the trouble because the OLPC devicetree is very sparse/limited and
fw_devlinkonly adds the links causing this issue. Considering that there aren't many users of OF in an X86 system, simplyfw_devlinkDT support for X86.[1] - https://lore.kernel.org/lkml/[email protected]/
Fixes ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""")Signed-off-by Saravana Kannan <[email protected]>Cc Andre Muller <[email protected]>--- drivers/of/property.c | 3 +++ 1 file changed, 3 insertions(+)drivers/of/property.c +0
-0drivers/of/property.c static int of_fwnode_add_links(struct fwnode_handle *fwnode) · line 1448
Quoted 5 lines
drivers/of/property.c +2
-0@@ -1444,6 +1444,9 @@ static int of_fwnode_add_links(struct fwnode_handle *fwnode)struct property *p;struct device_node *con_np =to_of_node (fwnode); +if (IS_ENABLED (CONFIG_X86 )) +return 0 ;I love it :)
Quoted 5 lines
Quoted 2 lines
Anyway, getting a "Tested-by:" would be great to have here. Andre, can you verify this solves your issue?
Yes, this patch fixes the issue, the drives work fine.
Tested-by Andre Müller <[email protected]>
Wonderful!
Or Rob, want me to take this through my tree?
thanks,
greg k-h
Quoted 9 lines · Saravana Kannan
Andre reported fw_devlink=on breaking OLPC XO-1.5 [1].
OLPC XO-1.5 is an X86 system that uses a mix of ACPI and OF to populate devices. The root cause seems to be ISA devices not setting their fwnode field. But trying to figure out how to fix that doesn't seem worth the trouble because the OLPC devicetree is very sparse/limited and
fw_devlinkonly adds the links causing this issue. Considering that there aren't many users of OF in an X86 system, simplyfw_devlinkDT support for X86.
Quoted 8 lines
[1] - https://lore.kernel.org/lkml/[email protected]/
Fixes ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""")Signed-off-by Saravana Kannan <[email protected]>Cc Andre Muller <[email protected]>--- drivers/of/property.c | 3 +++ 1 file changed, 3 insertions(+)
Applied, thanks!