linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Chukun Pan <amadeus@jmu.edu.cn>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: allwinner: define USB3 Ethernet on NanoPi R1S H5
Date: Mon, 9 May 2022 09:52:42 +0100	[thread overview]
Message-ID: <20220509095242.1de7a682@donnerap.cambridge.arm.com> (raw)
In-Reply-To: <20220508152505.7762-1-amadeus@jmu.edu.cn>

On Sun,  8 May 2022 23:25:05 +0800
Chukun Pan <amadeus@jmu.edu.cn> wrote:

Hi,

> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
> > > @@ -21,7 +21,8 @@ / {
> > >  
> > >  	aliases {
> > >  		ethernet0 = &emac;
> > > -		ethernet1 = &rtl8189etv;
> > > +		ethernet1 = &rtl8153;
> > > +		ethernet2 = &rtl8189etv;  
> 
> > Additionally, it's not a good idea to change order of ethernet nodes. It can 
> > affect mac address assigning procedure in bootloader.  
> 
> There is no eth1addr in uboot, so this doesn't affect the mac address.

Really? I don't have a board at hand to double check, but the code I read
here says otherwise:
https://source.denx.de/u-boot/u-boot/-/blob/master/board/sunxi/board.c#L791-813
There it checks for up to four ethernet aliases and assigns MAC addresses
to them, using the index in the lowest byte.
So this would change the MAC address of the WiFi adapter.

Am I missing something?

> The network order in the kernel is eth0(emac) / eth1(rtl8153) / wlan0,

Regardless of the fact that you shouldn't rely on indexes in device names,
wouldn't that be that same, regardless of the order of USB and WiFi?

Cheers,
Andre

> so I think it would be better to change it this way.
> 
> Thanks,
> Chukun
> 
> 


  reply	other threads:[~2022-05-09  9:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 14:40 [PATCH] arm64: dts: allwinner: define USB3 Ethernet on NanoPi R1S H5 Chukun Pan
2022-05-03 17:54 ` Jernej Škrabec
2022-05-03 20:00   ` Jernej Škrabec
2022-05-08 15:25   ` Chukun Pan
2022-05-09  8:52     ` Andre Przywara [this message]
2022-05-09 15:00     ` Chukun Pan

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=20220509095242.1de7a682@donnerap.cambridge.arm.com \
    --to=andre.przywara@arm.com \
    --cc=amadeus@jmu.edu.cn \
    --cc=devicetree@vger.kernel.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    /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 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).