[PATCH v2 05/19] state: fix deep probe handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



State backend doesn't necessarily point at a device tree node that has a
device associated, e.g. when we have a top-level fixed-partitions node
with the barebox-specific partuuid binding. As of_find_path_by_node will
iterate over all available cdev's we need not handle the error and can
just call of_find_path_by_node.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
v1 -> v2:
  - new patch
---
 common/state/state.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/common/state/state.c b/common/state/state.c
index 6b4acbb32bcc..85854f564d48 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -618,9 +618,15 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
 	}
 
 #ifdef __BAREBOX__
-	ret = of_partition_ensure_probed(partition_node);
-	if (ret)
-		goto out_release_state;
+	/*
+	 * On EFI, where devices are not instantiated from device tree, the
+	 * state backend may point at a top-level fixed-partitions partition
+	 * subnode with a partuuid property, which will be looked up globally.
+	 *
+	 * In order to support this binding, we do not early exit when
+	 * of_partition_ensure_probed fails, but instead try the custom binding.
+	 */
+	(void)of_partition_ensure_probed(partition_node);
 
 	ret = of_find_path_by_node(partition_node, &state->backend_path, 0);
 #else
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux