diff options
author | Mathew McBride <matt@traverse.com.au> | 2023-07-21 04:39:25 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-08-03 09:40:50 -0400 |
commit | 56610ef5f39d465299f8032eae4efa9362a8a2e7 (patch) | |
tree | cf632337d5cc91ad53bc53c33b667f1254bb97fe /board | |
parent | 080ea65692fd4ebf1040f67614c9e953f295baf5 (diff) | |
download | u-boot-56610ef5f39d465299f8032eae4efa9362a8a2e7.tar.gz u-boot-56610ef5f39d465299f8032eae4efa9362a8a2e7.tar.bz2 u-boot-56610ef5f39d465299f8032eae4efa9362a8a2e7.zip |
board: traverse: ten64: fix allocation order of MAC addresses
On Ten64 boards, the "serial number" is the MAC address of the
first Gigabit Ethernet interface (labelled GE0 on the appliance),
and counted up from there.
The previous logic did not take into account U-Boot's ordering
of the network interfaces. By setting aliases/ethernetX in the device
tree we can ensure the U-Boot 'ethX' is the same as the labelled
port order on the unit, as well as the one adopted by Linux.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Diffstat (limited to 'board')
-rw-r--r-- | board/traverse/ten64/ten64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/board/traverse/ten64/ten64.c b/board/traverse/ten64/ten64.c index 39f0d107cd..0febc0baf0 100644 --- a/board/traverse/ten64/ten64.c +++ b/board/traverse/ten64/ten64.c @@ -328,8 +328,8 @@ static void ten64_set_macaddrs_from_board_info(struct t64uc_board_info *boardinf this_dpmac_num = allocation_order[intfidx]; printf("DPMAC%d: %s\n", this_dpmac_num, ethaddr); snprintf(enetvar, 10, - (this_dpmac_num != 1) ? "eth%daddr" : "ethaddr", - this_dpmac_num - 1); + (intfidx != 0) ? "eth%daddr" : "ethaddr", + intfidx); macaddr++; if (!env_get(enetvar)) |