net: bgmac-platform: handle mac-address deferral
Subsystems (5)
PATCH 1/2 net: bgmac-platform: handle mac-address deferral
This patch is a replication of Christian Lamparter's "net: bgmac-bcma:
handle deferred probe error due to mac-address" patch for the bgmac-platform driver [1].
As is the case with the bgmac-bcma driver, this change is to cover the scenario where the MAC address cannot yet be discovered due to reliance on an nvmem provider which is yet to be instantiated, resulting in a random address being assigned that has to be manually overridden.
[1] https://lore.kernel.org/netdev/[email protected]
--- drivers/net/ethernet/broadcom/bgmac-platform.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/broadcom/bgmac-platform.c +3 -0
@@ -192,6 +192,9 @@ static int bgmac_probe(struct platform_device *pdev) bgmac->dma_dev = &pdev->dev; ret =of_get_mac_address (np, bgmac->net_dev->dev_addr); +if (ret == -EPROBE_DEFER ) +return ret; +if (ret)dev_warn (&pdev->dev,"MAC address not present in device tree\n" );
Signature · 1 line
2.27.0
PATCH 2/2 ARM: dts: NSP: MX6X: get mac-address from eeprom
The MAC address on the MX64/MX65 series is located on the AT24 EEPROM. This is the same as other Meraki devices such as the MR32 [1].
--- arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi +8 -0
@@ -39,6 +39,8 @@ led-3 { &amac2 { status = "okay"; + nvmem-cells = <&mac_address>; + nvmem-cell-names = "mac-address"; }; &ehci0 {
@@ -53,6 +55,12 @@ eeprom@50 { reg = <0x50>; pagesize = <32>; read-only; + #address-cells = <1>; + #size-cells = <1>; + + mac_address: mac-address@66 { + reg = <0x66 0x6>; + }; }; };
Signature · 1 line
2.27.0
Quoted 4 lines · Matthew Hagan
This patch is a replication of Christian Lamparter's "net: bgmac-bcma:
handle deferred probe error due to mac-address" patch for the bgmac-platform driver [1].
Quoted 8 lines
As is the case with the bgmac-bcma driver, this change is to cover the scenario where the MAC address cannot yet be discovered due to reliance on an nvmem provider which is yet to be instantiated, resulting in a random address being assigned that has to be manually overridden.
[1] https://lore.kernel.org/netdev/[email protected]
Signed-off-by Matthew Hagan <[email protected]>
Andrew
Quoted 4 lines · Matthew Hagan
This patch is a replication of Christian Lamparter's "net: bgmac-bcma:
handle deferred probe error due to mac-address" patch for the bgmac-platform driver [1].
Quoted 8 lines
As is the case with the bgmac-bcma driver, this change is to cover the scenario where the MAC address cannot yet be discovered due to reliance on an nvmem provider which is yet to be instantiated, resulting in a random address being assigned that has to be manually overridden.
[1] https://lore.kernel.org/netdev/[email protected]
Signed-off-by Matthew Hagan <[email protected]>
Signature · 1 line
Florian