From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3345B7B for ; Mon, 9 May 2022 08:52:54 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 106CD1042; Mon, 9 May 2022 01:52:47 -0700 (PDT) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 13E2E3F66F; Mon, 9 May 2022 01:52:45 -0700 (PDT) Date: Mon, 9 May 2022 09:52:42 +0100 From: Andre Przywara To: Chukun Pan Cc: Jernej Skrabec , 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 Message-ID: <20220509095242.1de7a682@donnerap.cambridge.arm.com> In-Reply-To: <20220508152505.7762-1-amadeus@jmu.edu.cn> References: <4393725.LvFx2qVVIh@kista> <20220508152505.7762-1-amadeus@jmu.edu.cn> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 8 May 2022 23:25:05 +0800 Chukun Pan 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 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C40C2C433EF for ; Mon, 9 May 2022 08:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tSiRyw76HYW6wMjQSyPQjvsW9VhTLRNJe1C6Socgg14=; b=bQY50953ujufJY xIEvtLOoCH0V80QwwqJtpPs2QsdOcMDQsmovxntZfZKRnTsgoC3pKx2J4xXT2tF3IaqxjdNw2tDEU r1X9GeSniehy1d3O9hPZ3+Fm0d+OT4CuZ76Zu2vX2b+iaIhsBMJw4I7nx3wbZf/tSsWADQEzNxeTg D2wdkXmWCRTA7Q50mAqB3WkbqeyT5ol7Jpl9T/mR4c0TwRSEoQoxKXuDLImmV0gg56YHwr90jyo6x NbQnhM4ffzNQhtREjLH7khr6vsjHp07g1ka3kt1dTgceSx/9ba+P/IGmYU9rHDIXSIZ0LPwI/yOZ0 vve9pPol6ZNHH29qplVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnz8n-00DExP-Pi; Mon, 09 May 2022 08:53:18 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnz8N-00DEjz-2K for linux-arm-kernel@lists.infradead.org; Mon, 09 May 2022 08:52:52 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 106CD1042; Mon, 9 May 2022 01:52:47 -0700 (PDT) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 13E2E3F66F; Mon, 9 May 2022 01:52:45 -0700 (PDT) Date: Mon, 9 May 2022 09:52:42 +0100 From: Andre Przywara To: Chukun Pan Cc: Jernej Skrabec , 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 Message-ID: <20220509095242.1de7a682@donnerap.cambridge.arm.com> In-Reply-To: <20220508152505.7762-1-amadeus@jmu.edu.cn> References: <4393725.LvFx2qVVIh@kista> <20220508152505.7762-1-amadeus@jmu.edu.cn> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220509_015251_284249_2B19B8BA X-CRM114-Status: GOOD ( 19.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, 8 May 2022 23:25:05 +0800 Chukun Pan 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 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel