netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: David Daney <ddaney@caviumnetworks.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	dinguyen@opensource.altera.com, david.daney@cavium.com
Subject: Re: [PATCH net] phy: micrel: Fix finding PHY properties in MAC node.
Date: Wed, 9 Dec 2015 19:52:51 +0100	[thread overview]
Message-ID: <20151209185251.GA14995@lunn.ch> (raw)
In-Reply-To: <56687621.9010602@caviumnetworks.com>

> >diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> >index cf6312fafea5..2493d7c035f2 100644
> >--- a/drivers/net/phy/micrel.c
> >+++ b/drivers/net/phy/micrel.c
> >@@ -26,6 +26,7 @@
> >  #include <linux/module.h>
> >  #include <linux/phy.h>
> >  #include <linux/micrel_phy.h>
> >+#include <linux/netdevice.h>
> 
> No new types are introduced by the patch.  Why do we need an
> additional #include?

We probably don't.

It took my debug patch which printed additional information, and
stripped the prints out. One of those prints needed netdev, but since
it has now gone, we probably don't need the include.

   Andrew

 
> >  #include <linux/of.h>
> >  #include <linux/clk.h>
> >
> >@@ -339,9 +340,18 @@ static int ksz9021_config_init(struct phy_device *phydev)
> >  {
> >  	const struct device *dev = &phydev->dev;
> >  	const struct device_node *of_node = dev->of_node;
> >+	const struct device *dev_walker;
> >
> >-	if (!of_node && dev->parent->of_node)
> >-		of_node = dev->parent->of_node;
> >+	/* The Micrel driver has a deprecated option to place phy OF
> >+	 * properties in the MAC node. Walk up the tree of devices to
> >+	 * find a device with an OF node.
> >+	 */
> >+	dev_walker = &phydev->dev;
> >+	do {
> >+		of_node = dev_walker->of_node;
> >+		dev_walker = dev_walker->parent;
> >+
> >+	} while (!of_node && dev_walker);
> >
> >  	if (of_node) {
> >  		ksz9021_load_values_from_of(phydev, of_node,
> >
> 

      reply	other threads:[~2015-12-09 18:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-09 18:37 [PATCH net] phy: micrel: Fix finding PHY properties in MAC node Andrew Lunn
2015-12-09 18:38 ` David Daney
2015-12-09 18:42 ` David Daney
2015-12-09 18:52   ` Andrew Lunn [this message]

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=20151209185251.GA14995@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=david.daney@cavium.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=dinguyen@opensource.altera.com \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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).