lkml.org 
[lkml]   [2021]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Re: [PATCH net-next v2 2/2] net: ethernet: mediatek: support custom GMAC label
On Wed, Apr 21, 2021 at 9:05 AM Frank Wunderlich
<frank-w@public-files.de> wrote:
>
> Hi,
>
> for dsa slave-ports there is already a property "label", but not for master/cpu-ports

Is that because slave ports are external and master are not? If so,
that makes sense.

> https://elixir.bootlin.com/linux/v5.12-rc8/source/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts#L163
>
> handled here:
>
> https://elixir.bootlin.com/linux/v5.12-rc8/source/net/dsa/dsa2.c#L1113
>
> @ilya maybe you can rename slave-ports instead of master-port without code change?
>
> i also prefer a more generic way to name interfaces in dts, not only in the mtk-driver, but the udev-approach is a way too, but this needs to be configured on each system manually...a preset by kernel/dts will be nice (at least to distinguish master/cpu- and user-ports).


Seems like it could be possible to want to distinguish port types for
reasons other than just what to name the device. Better to describe
that difference in DT and then base the device name off of that.

If you just want fixed numbering, then 'aliases' node is generally how
that is done (either because it sneaks in or fatigue from arguing
fixed /dev nodes are an anti-feature). There's already 'ethernetN'
which u-boot uses, but the kernel so far does not.

Rob

\
 
 \ /
  Last update: 2021-04-21 18:16    [W:0.590 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site