* [PATCH] net: eth-uclass: Fix message if mac is coming from DT or ROM
@ 2020-03-16 10:39 Michal Simek
2020-06-12 15:00 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Michal Simek @ 2020-03-16 10:39 UTC (permalink / raw)
To: u-boot
When local-mac-address DT property is specified it is reported the same way
as address read from eeprom/ROM. Show properly if mac address is coming
from DT or ROM.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
net/eth-uclass.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index ed81cbd53746..5cb8f9aa270f 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -490,6 +490,7 @@ static int eth_post_probe(struct udevice *dev)
struct eth_device_priv *priv = dev->uclass_priv;
struct eth_pdata *pdata = dev->platdata;
unsigned char env_enetaddr[ARP_HLEN];
+ char *source = "DT";
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
struct eth_ops *ops = eth_get_ops(dev);
@@ -522,6 +523,7 @@ static int eth_post_probe(struct udevice *dev)
/* Check if the device has a valid MAC address in device tree */
if (!eth_dev_get_mac_address(dev, pdata->enetaddr) ||
!is_valid_ethaddr(pdata->enetaddr)) {
+ source = "ROM";
/* Check if the device has a MAC address in ROM */
if (eth_get_ops(dev)->read_rom_hwaddr)
eth_get_ops(dev)->read_rom_hwaddr(dev);
@@ -543,8 +545,8 @@ static int eth_post_probe(struct udevice *dev)
memcpy(pdata->enetaddr, env_enetaddr, ARP_HLEN);
} else if (is_valid_ethaddr(pdata->enetaddr)) {
eth_env_set_enetaddr_by_index("eth", dev->seq, pdata->enetaddr);
- printf("\nWarning: %s using MAC address from ROM\n",
- dev->name);
+ printf("\nWarning: %s using MAC address from %s\n",
+ dev->name, source);
} else if (is_zero_ethaddr(pdata->enetaddr) ||
!is_valid_ethaddr(pdata->enetaddr)) {
#ifdef CONFIG_NET_RANDOM_ETHADDR
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] net: eth-uclass: Fix message if mac is coming from DT or ROM
2020-03-16 10:39 [PATCH] net: eth-uclass: Fix message if mac is coming from DT or ROM Michal Simek
@ 2020-06-12 15:00 ` Tom Rini
2020-06-15 6:04 ` Michal Simek
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2020-06-12 15:00 UTC (permalink / raw)
To: u-boot
On Mon, Mar 16, 2020 at 11:39:18AM +0100, Michal Simek wrote:
> When local-mac-address DT property is specified it is reported the same way
> as address read from eeprom/ROM. Show properly if mac address is coming
> from DT or ROM.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
In looking over the queue of networking patches, I think I prefer
http://patchwork.ozlabs.org/project/uboot/patch/20200611110321.9574-3-andre.przywara at arm.com/
which just removes the message entirely and is consistent with the
non-DM case.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200612/c9f0cd5c/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] net: eth-uclass: Fix message if mac is coming from DT or ROM
2020-06-12 15:00 ` Tom Rini
@ 2020-06-15 6:04 ` Michal Simek
2020-06-15 14:26 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Michal Simek @ 2020-06-15 6:04 UTC (permalink / raw)
To: u-boot
Hi Tom,
On 12. 06. 20 17:00, Tom Rini wrote:
> On Mon, Mar 16, 2020 at 11:39:18AM +0100, Michal Simek wrote:
>
>> When local-mac-address DT property is specified it is reported the same way
>> as address read from eeprom/ROM. Show properly if mac address is coming
>> from DT or ROM.
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>
> In looking over the queue of networking patches, I think I prefer
> http://patchwork.ozlabs.org/project/uboot/patch/20200611110321.9574-3-andre.przywara at arm.com/
> which just removes the message entirely and is consistent with the
> non-DM case.
>
My patch is already in your tree. The patch you pointed me too is just
removing one message.
Thanks,
Michal
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] net: eth-uclass: Fix message if mac is coming from DT or ROM
2020-06-15 6:04 ` Michal Simek
@ 2020-06-15 14:26 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2020-06-15 14:26 UTC (permalink / raw)
To: u-boot
On Mon, Jun 15, 2020 at 08:04:33AM +0200, Michal Simek wrote:
> Hi Tom,
>
> On 12. 06. 20 17:00, Tom Rini wrote:
> > On Mon, Mar 16, 2020 at 11:39:18AM +0100, Michal Simek wrote:
> >
> >> When local-mac-address DT property is specified it is reported the same way
> >> as address read from eeprom/ROM. Show properly if mac address is coming
> >> from DT or ROM.
> >>
> >> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> >
> > In looking over the queue of networking patches, I think I prefer
> > http://patchwork.ozlabs.org/project/uboot/patch/20200611110321.9574-3-andre.przywara at arm.com/
> > which just removes the message entirely and is consistent with the
> > non-DM case.
> >
>
> My patch is already in your tree. The patch you pointed me too is just
> removing one message.
Sigh, the number of times the patchwork scripts don't match commits to
patch ids is frustrating at times.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200615/2dd95e97/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-15 14:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 10:39 [PATCH] net: eth-uclass: Fix message if mac is coming from DT or ROM Michal Simek
2020-06-12 15:00 ` Tom Rini
2020-06-15 6:04 ` Michal Simek
2020-06-15 14:26 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.