Skip to contentSkip to conversation

bootvx_fdt: fix missing 'fdt_fixup_ethernet(...)' on vxWorks boot

PATCH Superseded Hannes Schmelzer 2 participants 2 messages Aug 25, 2017

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 bootvx_fdt: fix missing 'fdt_fixup_ethernet(...)' on vxWorks boot

Before commit 26d6119 (fdt: Move fdt_fixup_ethernet to a common place) the fdt_fixup_ethernet(...) was called during do_bootvx_fdt(...).

Afterwards the only (common) place for this fixup is during image_setup_libfdt(...) and this is only called, at least on ARM platform, from image_setup_linux(...).

All this ends up in the fact, that the fdt_fixup_ethernet(...) is only called on booting a linux image and not on booting a vxWorks image.

We fix this with adding the fdt_fixup_ethernet(...) call again to do_bootvx_fdt(...)

---

Changes in v2:
- restore original behaviour from b3b522f247d3f19c4f2309ab0e6a02b3dd82de45 with moving the fdt_fixup_ethernet(...) call after boot_relocate_fdt(...)

 common/bootm_os.c | 2 ++
 1 file changed, 2 insertions(+)
common/bootm_os.c +2 -0
index 1feea8a..934019f 100644
@@ -275,6 +275,8 @@ void do_bootvx_fdt(bootm_headers_t *images)
 		ret = boot_relocate_fdt(lmb, of_flat_tree, &of_size);
 		if (ret)
 			return;
+		/* Update ethernet nodes */
+		fdt_fixup_ethernet(*of_flat_tree);
 
 		ret = fdt_add_subnode(*of_flat_tree, 0, "chosen");
 		if ((ret >= 0 || ret == -FDT_ERR_EXISTS)) {
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 bootvx_fdt: fix missing 'fdt_fixup_ethernet(...)' on vxWorks boot

Quoted 30 lines · Hannes Schmelzer

Before commit 26d6119 (fdt: Move fdt_fixup_ethernet to a common place) the fdt_fixup_ethernet(...) was called during do_bootvx_fdt(...).

Afterwards the only (common) place for this fixup is during image_setup_libfdt(...) and this is only called, at least on ARM platform, from image_setup_linux(...).

All this ends up in the fact, that the fdt_fixup_ethernet(...) is only called on booting a linux image and not on booting a vxWorks image.

We fix this with adding the fdt_fixup_ethernet(...) call again to do_bootvx_fdt(...)

---

Changes in v2:
- restore original behaviour from b3b522f247d3f19c4f2309ab0e6a02b3dd82de45 with moving the fdt_fixup_ethernet(...) call after boot_relocate_fdt(...)

 common/bootm_os.c | 2 ++
 1 file changed, 2 insertions(+)
common/bootm_os.c +0 -0
index 1feea8a..934019f 100644

common/bootm_os.c void do_bootvx_fdt(bootm_headers_t *images) · line 277

Quoted 3 lines
common/bootm_os.c +0 -0
@@ -275,6 +275,8 @@ void do_bootvx_fdt(bootm_headers_t *images)
                ret = boot_relocate_fdt(lmb, of_flat_tree, &of_size);
                if (ret)
                        return;

nits: please add one blank line here.

common/bootm_os.c void do_bootvx_fdt(bootm_headers_t *images)

Quoted 6 lines
common/bootm_os.c +2 -1
+               /* Update ethernet nodes */
+               fdt_fixup_ethernet(*of_flat_tree);
 
                ret = fdt_add_subnode(*of_flat_tree, 0, "chosen");
                if ((ret >= 0 || ret == -FDT_ERR_EXISTS)) {
--