[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y4fMBl6sv+SUyt9Z@lunn.ch>
Date: Wed, 30 Nov 2022 22:32:54 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Brian Masney <bmasney@...hat.com>
Cc: irusskikh@...vell.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, cth451@...il.com
Subject: Re: [PATCH] net: atlantic: fix check for invalid ethernet addresses
> > > - return !(addr[0] == 0 && addr[1] == 0 && addr[2] == 0);
> > > + return !(addr[0] == 0 && addr[1] == 0 && addr[2] == 0) &&
> > > + !(addr[3] == 0 && addr[4] == 0 && addr[5] == 0);
> >
> > Hi Brian
> >
> > is_valid_ether_addr()
>
> aq_nic_ndev_register() already calls is_valid_ether_addr():
>
> if (is_valid_ether_addr(addr) &&
> aq_nic_is_valid_ether_addr(addr)) {
> (self->ndev, addr);
> } else {
> ...
> }
>
> That won't work for this board since that function only checks that the
> MAC "is not 00:00:00:00:00:00, is not a multicast address, and is not
> FF:FF:FF:FF:FF:FF." The MAC address that we get on all of our boards is
> 00:17:b6:00:00:00.
Which is a valid MAC address. So i don't see why the kernel should
reject it and use a random one.
Maybe you should talk to Marvell about how you can program the
e-fuses. You can then use MAC addresses from A8-97-DC etc.
Andrew
Powered by blists - more mailing lists