netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Andrew Lunn <andrew@lunn.ch>, David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	aaro.koskinen@nokia.com, olof@lixom.net
Subject: Re: [PATCH net 1/2] of: of_mdio: Add a whitelist of PHY compatibilities.
Date: Wed, 27 Jan 2016 16:51:38 +0300	[thread overview]
Message-ID: <56A8CB6A.2070101@cogentembedded.com> (raw)
In-Reply-To: <1453853499-11248-2-git-send-email-andrew@lunn.ch>

Hello.

On 01/27/2016 03:11 AM, Andrew Lunn wrote:

> Some phy nodes list a compatible value indicating the PHY make/model.
> This is never used to match the device to the driver. However it does
> confuse the code to separate a PHY from a generic MDIO device like a
> switch. Generic MDIO devices must have a compatible value, PHYs can
> list clause 22 or 45, but nothing else.
>
> Issue a warning if we find a compatible value known on the whitelist,

    My spell-checker trips on "whitelist"... Perhaps a space/hyphen needed?

> and say it is a PHY.
>
> Fixes: a9049e0c513c ("mdio: Add support for mdio drivers.")
> Reported-by: Aaro Koskinen <aaro.koskinen@nokia.com>
> Reported-by: Olof Johansson <olof@lixom.net>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>   drivers/of/of_mdio.c | 27 +++++++++++++++++++++++++++
>   1 file changed, 27 insertions(+)
>
> diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
> index b5aa004a24b6..26c245041493 100644
> --- a/drivers/of/of_mdio.c
> +++ b/drivers/of/of_mdio.c
> @@ -143,11 +143,31 @@ int of_mdio_parse_addr(struct device *dev, const struct device_node *np)
>   }
>   EXPORT_SYMBOL(of_mdio_parse_addr);
>
> +/* The following is a list of PHY compatible strings which appear in
> + * some DTBs. The compatible string is never matched against a PHY
> + * driver, so is pointless. We only expect devices which are not PHYs
> + * to have a compatible string, so they can be matched to an MDIO
> + * driver.  Encourage users to upgrade there DT blobs to remove these.

    s/there/their/.

[...]
> @@ -166,6 +186,13 @@ static bool of_mdiobus_child_is_phy(struct device_node *child)
>   	if (of_device_is_compatible(child, "ethernet-phy-ieee802.3-c22"))
>   		return true;
>
> +	if (of_match_node(whitelist_phys, child)) {
> +		pr_warn(FW_WARN
> +			"%s: Whitelisted compatible string. Please remove\n",

    White-listed?

[...]

MBR, Sergei

  parent reply	other threads:[~2016-01-27 13:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27  0:11 [PATCH net 0/2] Part 2 of v4.5-rc1 phylib regression Andrew Lunn
2016-01-27  0:11 ` [PATCH net 1/2] of: of_mdio: Add a whitelist of PHY compatibilities Andrew Lunn
2016-01-27 11:17   ` Aaro Koskinen
2016-01-27 13:51   ` Sergei Shtylyov [this message]
2016-01-27 14:03     ` Andrew Lunn
2016-01-27  0:11 ` [PATCH net 2/2] DT: phy.txt: Clarify expected compatible values Andrew Lunn
2016-01-27  0:33   ` Florian Fainelli
2016-01-27  1:06     ` Andrew Lunn
2016-01-27  1:25       ` Florian Fainelli
2016-01-27  1:57         ` Andrew Lunn
2016-01-27 16:31           ` Florian Fainelli
2016-01-27 16:41   ` Olof Johansson
2016-01-27 17:11     ` Andrew Lunn
2016-01-27 17:32       ` Olof Johansson
2016-01-27 17:36         ` Andrew Lunn

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=56A8CB6A.2070101@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=aaro.koskinen@nokia.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olof@lixom.net \
    /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).