* [PATCH net-next] net: ocelot: add support to get port mac from device-tree
@ 2021-12-14 9:55 Clément Léger
2021-12-15 11:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Clément Léger @ 2021-12-14 9:55 UTC (permalink / raw)
To: David S. Miller, Jakub Kicinski, Vladimir Oltean, Claudiu Manoil,
Alexandre Belloni, UNGLinuxDriver
Cc: Clément Léger, netdev, devicetree, linux-kernel,
Thomas Petazzoni, Julian Wiedmann
Add support to get mac from device-tree using of_get_ethdev_address.
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
---
drivers/net/ethernet/mscc/ocelot_net.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mscc/ocelot_net.c b/drivers/net/ethernet/mscc/ocelot_net.c
index 5fc8a0f8e8cd..8115c3db252e 100644
--- a/drivers/net/ethernet/mscc/ocelot_net.c
+++ b/drivers/net/ethernet/mscc/ocelot_net.c
@@ -1695,7 +1695,10 @@ int ocelot_probe_port(struct ocelot *ocelot, int port, struct regmap *target,
NETIF_F_HW_TC;
dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_TC;
- eth_hw_addr_gen(dev, ocelot->base_mac, port);
+ err = of_get_ethdev_address(portnp, dev);
+ if (err)
+ eth_hw_addr_gen(dev, ocelot->base_mac, port);
+
ocelot_mact_learn(ocelot, PGID_CPU, dev->dev_addr,
OCELOT_VLAN_UNAWARE_PVID, ENTRYTYPE_LOCKED);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: ocelot: add support to get port mac from device-tree
2021-12-14 9:55 [PATCH net-next] net: ocelot: add support to get port mac from device-tree Clément Léger
@ 2021-12-15 11:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-15 11:10 UTC (permalink / raw)
To: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2VyIDxjbGVtZW50LmxlZ2VyQGJvb3RsaW4uY29tPg==?=
Cc: davem, kuba, vladimir.oltean, claudiu.manoil, alexandre.belloni,
UNGLinuxDriver, netdev, devicetree, linux-kernel,
thomas.petazzoni, jwi
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Tue, 14 Dec 2021 10:55:34 +0100 you wrote:
> Add support to get mac from device-tree using of_get_ethdev_address.
>
> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> Signed-off-by: Clément Léger <clement.leger@bootlin.com>
> ---
> drivers/net/ethernet/mscc/ocelot_net.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Here is the summary with links:
- [net-next] net: ocelot: add support to get port mac from device-tree
https://git.kernel.org/netdev/net-next/c/843869951258
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-15 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 9:55 [PATCH net-next] net: ocelot: add support to get port mac from device-tree Clément Léger
2021-12-15 11:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).