All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eugeniy.Paltsev@synopsys.com (Eugeniy Paltsev)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH] ARC: AXS10x/HSDK: Allow U-Boot to pass MAC-address to the kernel
Date: Mon, 6 Aug 2018 13:24:56 +0000	[thread overview]
Message-ID: <1533561894.32021.5.camel@synopsys.com> (raw)
In-Reply-To: <C2D7FE5348E1B147BCA15975FBA23075012B089D74@us01wembx1.internal.synopsys.com>

Hi Vineet,

On Thu, 2018-08-02@21:58 +0000, Vineet Gupta wrote:
> On 08/02/2018 03:19 AM, Alexey Brodkin wrote:
> > Otherwise kernel uses random MAC which is not very conveniet.
> 
> Curious what exactly is the issue - why does the user care what MAC is assigned ?
> 
> > With that change in place use might set desired MAC in U-Boot
> > with "setenv ethaddr 11:22:33:44:55:66", save environment and
> > then from boot to boot the same MAC will be used by the kernel.
> > 
> 
> And what if one is running without uboot - it will resort to all zeros vs. random
> yet working MAC ?
> 

If one is running without u-boot - it will resort to random MAC as we don't treat 
"00:00:00:00:00:00" as a valid Ethernet address.

Look at following link for more details.
https://elixir.bootlin.com/linux/v4.18-rc8/source/include/linux/etherdevice.h#L184


BTW:
Tested-by: Evgeniy Paltsev <paltsev at synopsys.com>

> 
> _______________________________________________
> linux-snps-arc mailing list
> linux-snps-arc at lists.infradead.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_mailman_listinfo_linux-2Dsnps-2Darc&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=ZlJN
> 1MriPUTkBKCrPSx67GmaplEUGcAEk9yPtCLdUXI&m=pEe31Mq4FC20ZBQ1SMGdCpesPmQFyaQCdpY9-N_aWRc&s=lwI7vTqAmbVPHdfMz_FlOzfBDvtYCQDL-6s-Z2FFr_Y&e=
-- 
 Eugeniy Paltsev

WARNING: multiple messages have this Message-ID (diff)
From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
To: "Vineet.Gupta1@synopsys.com" <Vineet.Gupta1@synopsys.com>,
	"Alexey.Brodkin@synopsys.com" <Alexey.Brodkin@synopsys.com>,
	"linux-snps-arc@lists.infradead.org"
	<linux-snps-arc@lists.infradead.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH] ARC: AXS10x/HSDK: Allow U-Boot to pass MAC-address to the kernel
Date: Mon, 6 Aug 2018 13:24:56 +0000	[thread overview]
Message-ID: <1533561894.32021.5.camel@synopsys.com> (raw)
In-Reply-To: <C2D7FE5348E1B147BCA15975FBA23075012B089D74@us01wembx1.internal.synopsys.com>

Hi Vineet,

On Thu, 2018-08-02 at 21:58 +0000, Vineet Gupta wrote:
> On 08/02/2018 03:19 AM, Alexey Brodkin wrote:
> > Otherwise kernel uses random MAC which is not very conveniet.
> 
> Curious what exactly is the issue - why does the user care what MAC is assigned ?
> 
> > With that change in place use might set desired MAC in U-Boot
> > with "setenv ethaddr 11:22:33:44:55:66", save environment and
> > then from boot to boot the same MAC will be used by the kernel.
> > 
> 
> And what if one is running without uboot - it will resort to all zeros vs. random
> yet working MAC ?
> 

If one is running without u-boot - it will resort to random MAC as we don't treat 
"00:00:00:00:00:00" as a valid Ethernet address.

Look at following link for more details.
https://elixir.bootlin.com/linux/v4.18-rc8/source/include/linux/etherdevice.h#L184


BTW:
Tested-by: Evgeniy Paltsev <paltsev@synopsys.com>

> 
> _______________________________________________
> linux-snps-arc mailing list
> linux-snps-arc@lists.infradead.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_mailman_listinfo_linux-2Dsnps-2Darc&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=ZlJN
> 1MriPUTkBKCrPSx67GmaplEUGcAEk9yPtCLdUXI&m=pEe31Mq4FC20ZBQ1SMGdCpesPmQFyaQCdpY9-N_aWRc&s=lwI7vTqAmbVPHdfMz_FlOzfBDvtYCQDL-6s-Z2FFr_Y&e=
-- 
 Eugeniy Paltsev

  reply	other threads:[~2018-08-06 13:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02 10:19 [PATCH] ARC: AXS10x/HSDK: Allow U-Boot to pass MAC-address to the kernel Alexey Brodkin
2018-08-02 10:19 ` Alexey Brodkin
2018-08-02 21:58 ` Vineet Gupta
2018-08-02 21:58   ` Vineet Gupta
2018-08-06 13:24   ` Eugeniy Paltsev [this message]
2018-08-06 13:24     ` Eugeniy Paltsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533561894.32021.5.camel@synopsys.com \
    --to=eugeniy.paltsev@synopsys.com \
    --cc=linux-snps-arc@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.