[U-Boot] [PATCH] driver: net: fsl-mc: Fix DPC MAC address fixup

If node /board_info/ports does not exist in the DPC file, function mc_fixup_dpc() will skip not only MAC address fixup, but also the cache flush at the end. This may cause the other fixup changes (e.g. ICID relatd ones) to be ignored by MC.
Fixes: 1161dbcc0a36 ("drivers: net: fsl-mc: Include MAC addr fixup to DPL")
Signed-off-by: Ioana Radulescu ruxandra.radulescu@nxp.com --- drivers/net/fsl-mc/mc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index a51b8a4..e6cf7f3 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -421,9 +421,11 @@ static int mc_fixup_dpc(u64 dpc_addr) /* fixup MAC addresses for dpmac ports */ nodeoffset = fdt_path_offset(blob, "/board_info/ports"); if (nodeoffset < 0) - return 0; + goto out;
err = mc_fixup_mac_addrs(blob, MC_FIXUP_DPC); + +out: flush_dcache_range(dpc_addr, dpc_addr + fdt_totalsize(blob));
return err;

On Tue, Feb 26, 2019 at 9:51 AM Ioana Ciocoi Radulescu ruxandra.radulescu@nxp.com wrote:
If node /board_info/ports does not exist in the DPC file, function mc_fixup_dpc() will skip not only MAC address fixup, but also the cache flush at the end. This may cause the other fixup changes (e.g. ICID relatd ones) to be ignored by MC.
Typo in commit log.
Fixes: 1161dbcc0a36 ("drivers: net: fsl-mc: Include MAC addr fixup to DPL")
Signed-off-by: Ioana Radulescu ruxandra.radulescu@nxp.com
Acked-by: Joe Hershberger joe.hershberger@ni.com

-----Original Message----- From: Joe Hershberger joe.hershberger@gmail.com Sent: Tuesday, March 5, 2019 12:48 AM To: Ioana Ciocoi Radulescu ruxandra.radulescu@nxp.com Cc: u-boot@lists.denx.de; Prabhakar Kushwaha prabhakar.kushwaha@nxp.com Subject: Re: [U-Boot] [PATCH] driver: net: fsl-mc: Fix DPC MAC address fixup
On Tue, Feb 26, 2019 at 9:51 AM Ioana Ciocoi Radulescu ruxandra.radulescu@nxp.com wrote:
If node /board_info/ports does not exist in the DPC file, function mc_fixup_dpc() will skip not only MAC address fixup, but also the cache flush at the end. This may cause the other fixup changes (e.g. ICID relatd ones) to be ignored by MC.
Typo in commit log.
Fixes: 1161dbcc0a36 ("drivers: net: fsl-mc: Include MAC addr fixup to DPL")
Signed-off-by: Ioana Radulescu ruxandra.radulescu@nxp.com
Acked-by: Joe Hershberger joe.hershberger@ni.com
Applied to u-boot-fsl-qoriq, awaiting upstream
--pk
participants (3)
-
Ioana Ciocoi Radulescu
-
Joe Hershberger
-
Prabhakar Kushwaha