All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Ard Biesheuvel <ardb@kernel.org>,
	netdev@vger.kernel.org, Jassi Brar <jaswinder.singh@linaro.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Willy Liu <willy.liu@realtek.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Masahisa Kojima <masahisa.kojima@linaro.org>,
	Serge Semin <fancer.lancer@gmail.com>
Subject: Re: [PATCH net] netsec: ignore 'phy-mode' device property on ACPI systems
Date: Sun, 18 Oct 2020 23:32:25 +0300	[thread overview]
Message-ID: <20201018203225.GA1790657@apalos.home> (raw)
In-Reply-To: <20201018175218.GG456889@lunn.ch>

On Sun, Oct 18, 2020 at 07:52:18PM +0200, Andrew Lunn wrote:
> > --- a/Documentation/devicetree/bindings/net/socionext-netsec.txt
> > +++ b/Documentation/devicetree/bindings/net/socionext-netsec.txt
> > @@ -30,7 +30,9 @@ Optional properties: (See ethernet.txt file in the same directory)
> >  - max-frame-size: See ethernet.txt in the same directory.
> >  
> >  The MAC address will be determined using the optional properties
> > -defined in ethernet.txt.
> > +defined in ethernet.txt. The 'phy-mode' property is required, but may
> > +be set to the empty string if the PHY configuration is programmed by
> > +the firmware or set by hardware straps, and needs to be preserved.
> 
> In general, phy-mode is not mandatory. of_get_phy_mode() does the
> right thing if it is not found, it sets &priv->phy_interface to
> PHY_INTERFACE_MODE_NA, but returns -ENODEV. Also, it does not break
> backwards compatibility to convert a mandatory property to
> optional. So you could just do
> 
> 	of_get_phy_mode(pdev->dev.of_node, &priv->phy_interface);
> 
> skip all the error checking, and document it as optional.

Why ?
The patch as is will not affect systems built on any firmware implementations 
that use ACPI and somehow configure the hardware. 
Although the only firmware implementations I am aware of on upsteream are based
on EDK2, I prefer the explicit error as is now, in case a firmware does on 
initialize the PHY properly (and is using a DT).

Cheers
/Ilias

> 
>      Andrew

  reply	other threads:[~2020-10-18 20:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-18 16:36 [PATCH net] netsec: ignore 'phy-mode' device property on ACPI systems Ard Biesheuvel
2020-10-18 17:52 ` Andrew Lunn
2020-10-18 20:32   ` Ilias Apalodimas [this message]
2020-10-19  6:30     ` Ard Biesheuvel
2020-10-20  8:47       ` Ilias Apalodimas
2020-10-20 12:49         ` Andrew Lunn
2020-10-20 13:23           ` Ard Biesheuvel
2020-10-20 12:50 ` Andrew Lunn
2020-10-20 23:12   ` Jakub Kicinski

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=20201018203225.GA1790657@apalos.home \
    --to=ilias.apalodimas@linaro.org \
    --cc=andrew@lunn.ch \
    --cc=ardb@kernel.org \
    --cc=davem@davemloft.net \
    --cc=fancer.lancer@gmail.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=kuba@kernel.org \
    --cc=masahisa.kojima@linaro.org \
    --cc=mhiramat@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=willy.liu@realtek.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 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.