devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Mikhaylov <fr0st61te@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Samuel Mendoza-Jonas <sam@mendozajonas.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Paul Fertser <fercerpav@gmail.com>,
	openbmc@lists.ozlabs.org
Subject: Re: [PATCH 3/4] net/ftgmac100: add mac-address-increment option for GMA command from NC-SI
Date: Sun, 23 Apr 2023 01:02:17 +0000	[thread overview]
Message-ID: <38eff1f50343a576edd115be9283f6bd28bd2008.camel@gmail.com> (raw)
In-Reply-To: <20230418185445.GA2111443-robh@kernel.org>

On Tue, 2023-04-18 at 13:54 -0500, Rob Herring wrote:
> On Thu, Apr 13, 2023 at 12:29:04AM +0000, Ivan Mikhaylov wrote:
> > Add s32 mac-address-increment option for Get MAC Address command
> > from
> > NC-SI.
> > 
> > Signed-off-by: Paul Fertser <fercerpav@gmail.com>
> > Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
> > ---
> >  Documentation/devicetree/bindings/net/ftgmac100.txt | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/ftgmac100.txt
> > b/Documentation/devicetree/bindings/net/ftgmac100.txt
> > index 29234021f601..7ef5329d888d 100644
> > --- a/Documentation/devicetree/bindings/net/ftgmac100.txt
> > +++ b/Documentation/devicetree/bindings/net/ftgmac100.txt
> > @@ -22,6 +22,10 @@ Optional properties:
> >  - use-ncsi: Use the NC-SI stack instead of an MDIO PHY. Currently
> > assumes
> >    rmii (100bT) but kept as a separate property in case NC-SI grows
> > support
> >    for a gigabit link.
> > +- mac-address-increment: Increment the MAC address taken by GMA
> > command via
> > +  NC-SI. Specifies a signed number to be added to the host MAC
> > address as
> > +  obtained by the OEM GMA command. If not specified, 1 is used by
> > default
> > +  for Broadcom and Intel network cards, 0 otherwise.
> 
> This would need to be common. There's been some attempts around how
> to 
> support a base MAC address with a transform per instance. So far it's
> not clear that something in DT works for everyone. Until there's 
> something common (if ever), you need platform specific code somewhere
> to 
> handle this. The nvmem binding has had some extensions to support
> that.
> 
> Rob

Rob, I agree but unfortunately there isn't a generic option for such
case, maybe something should be added into net/ethernet-
controller.yaml? As example, `mac-address-increment` option using
widely in openwrt project. About nvmem, are we talking `nvmem-cell-
names` option or reverse_mac_address in drivers/nvmem/imx-ocotp.c?

I'll do the transfer into DT schema, that's not a problem but after
naming resolve.

Adding openbmc community, maybe they have some ideas about this one.

Thanks.

  reply	other threads:[~2023-04-22 22:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13  0:29 [PATCH 0/4] Refactoring for GMA command Ivan Mikhaylov
2023-04-13  0:29 ` [PATCH 1/4] net/ncsi: make one oem_gma function for all mfr id Ivan Mikhaylov
2023-04-13  0:29 ` [PATCH 2/4] net/ncsi: change from ndo_set_mac_address to dev_set_mac_address Ivan Mikhaylov
2023-04-13  0:29 ` [PATCH 3/4] net/ftgmac100: add mac-address-increment option for GMA command from NC-SI Ivan Mikhaylov
2023-04-13  7:53   ` Krzysztof Kozlowski
2023-04-18 18:54   ` Rob Herring
2023-04-23  1:02     ` Ivan Mikhaylov [this message]
2023-04-13  0:29 ` [PATCH 4/4] net/ncsi: add shift MAC address property Ivan Mikhaylov

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=38eff1f50343a576edd115be9283f6bd28bd2008.camel@gmail.com \
    --to=fr0st61te@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=fercerpav@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=sam@mendozajonas.com \
    /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).