msm8916-openwrt/target/linux/mvebu/patches-6.6/701-mvpp2-read-mac-address-from-nvmem.patch
John Audia 3711557bdf kernel: bump 6.6 to 6.6.36
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.36

Manually rebased:
        generic/hack-6.6/765-mxl-gpy-control-LED-reg-from-DT.patch
        bcm27xx/patches-6.6/950-0536-dmaengine-dw-axi-dmac-Fixes-for-RP1.patch

Removed upstreamed:
	bmips/patches-6.6/010-v6.10-mips-bmips-BCM6358-make-sure-CBR-is-correctly-set.patch[1]

All other patches automatically rebased.

1. 7c9644a7b5

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-07-04 22:07:10 +02:00

28 lines
884 B
Diff

From: Tobias Schramm <tobias@t-sys.eu>
Subject: mvpp2: support fetching mac address from nvmem
The mvpp2 driver did not query nvmem for hardware mac addresses. This
patch adds querying of mac addresses stored in nvmem cells as a further
fallback option before assigning a random address.
Purposely added separately to fwnode_get_mac_address() above to maintain
existing behaviour with builtin adapter mac address still taking
precedence.
Signed-off-by: Tobias Schramm <tobias@t-sys.eu>
---
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -6156,6 +6156,12 @@ static int mvpp2_port_copy_mac_addr(stru
return 0;
}
+ if (!of_get_mac_address(to_of_node(fwnode), hw_mac_addr)) {
+ *mac_from = "nvmem cell";
+ eth_hw_addr_set(dev, hw_mac_addr);
+ return 0;
+ }
+
*mac_from = "random";
eth_hw_addr_random(dev);