u-boot/drivers/net/fsl-mc
Ioana Ciornei 8491a7e4ed drivers: net: fsl-mc: fix MAC address fixup procedure
In the process of adopting CONFIG_DM_ETH on the DPAA2 based platforms,
interfaces which were previously defined as "xgmii" were transitioned to
be defined as "xfi" in the DTS.
See the commit below for reference:
commit 87274918f2 ("arm: dts: ls2088ardb: add DPMAC and PHY nodes")

Then Vladimir's commit replaced all occurrences of "xfi" with
"10gbase-r" in an effort to make U-Boot work with the same device tree
as Linux.
commit 77b11f7604 ("net: replace the "xfi" phy-mode with "10gbase-r"")

These changes to the phy_interface_t of an Ethernet port meant that the
mc_fixup_mac_addrs() function was no longer capable to properly fixup
the MAC addresses. The problem arises from the fact that the hardcoded
information about an interface (wriop_get_enet_if()) was no longer
matching any actual device.

For example, the function tried to search for "DPMAC1@xgmii1" by name
using eth_get_dev_by_name() when only "DPMAC1@10gbase-r" was available.

This function removes the need to rely on the hardcoded information by
iterating through all the UCLASS_ETH devices which are DPAA2 and request
a fixup for each of them.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-05-05 13:41:55 -04:00
..
dpio global: Move remaining CONFIG_SYS_* to CFG_SYS_* 2022-12-05 16:06:08 -05:00
dpbp.c driver: net: fsl-mc: updated copyright info 2018-05-09 09:17:51 -05:00
dpmac.c driver: net: fsl-mc: updated copyright info 2018-05-09 09:17:51 -05:00
dpmng.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dpni.c WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
dprc.c driver: net: fsl-mc: updated copyright info 2018-05-09 09:17:51 -05:00
dpsparser.c drivers/fsl-mc: Support DPSPARSER object and apply spb command 2019-12-26 16:00:20 +05:30
fsl_dpmng_cmd.h driver: net: fsl-mc: updated copyright info 2018-05-09 09:17:51 -05:00
Kconfig fsl-mc: Update dependencies for DM_ETH 2022-08-20 21:18:15 -04:00
Makefile drivers/fsl-mc: Support DPSPARSER object and apply spb command 2019-12-26 16:00:20 +05:30
mc.c drivers: net: fsl-mc: fix MAC address fixup procedure 2023-05-05 13:41:55 -04:00
mc_sys.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00