Netdev List
 help / color / mirror / Atom feed
From: Dinh Nguyen <dinguyen@opensource.altera.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] net/phy: micrel: Follow attached_dev to get to the MAC device
Date: Sun, 18 Oct 2015 00:54:07 -0500	[thread overview]
Message-ID: <alpine.DEB.2.02.1510180049590.20377@linux-builds1> (raw)
In-Reply-To: <alpine.DEB.2.02.1510172314290.20377@linux-builds1>

On Sat, 17 Oct 2015, Dinh Nguyen wrote:

> On Sat, 17 Oct 2015, Andrew Lunn wrote:
> 
> > > Sure, will try to debug. It looks like phydev->attached_dev is valid, but
> > > phydev->attached_dev->dev.of_node is NULL.
> > 
> > Humm
> > 
> > phydev->attached_dev is a net_device, so should be the mac.  What
> > device is phydev->attached_dev->dev? Is it not the dev embedded in the
> > platform_device passed to socfpga_dwmac_probe()?
> >
> 
> Yes, it looks like it is, the dev->of_node is valid in socfpga_dwmac_probe(),
> but it looks like of_node is getting lost somewhere. 
> 

Do you know why this happening? In ksz9021_config_init():

@@ -345,7 +345,11 @@ static int ksz9021_config_init(struct phy_device *phydev)
            phydev->attached_dev->dev.of_node)
                of_node = phydev->attached_dev->dev.of_node;

+	printk("%s %08x\n", __func__, phydev->attached_dev->dev.of_node);
+       printk("%s %08x %08x\n", __func__, phydev->attached_dev->dev, phydev->attached_dev->dev.of_node);


[    1.923311] ksz9021_config_init 00000000
[    1.927224] ksz9021_config_init eedc0210 ee401680

The first printout shows phydev->attached_dev->dev.of_node is NULL. but the
second printout, where I'm also printing out phydev->attached_dev->dev, then
phydev->attached_dev->dev.of_node is not NULL.

BR,
Dinh

  reply	other threads:[~2015-10-18  6:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 20:49 [PATCH] net/phy: micrel: Follow attached_dev to get to the MAC device Andrew Lunn
2015-10-16 22:58 ` Dinh Nguyen
2015-10-16 23:50   ` Andrew Lunn
2015-10-17 14:21     ` Dinh Nguyen
2015-10-17 15:06       ` Dinh Nguyen
2015-10-17 15:38         ` Andrew Lunn
2015-10-17 17:38         ` Florian Fainelli
2015-10-17 20:45       ` Andrew Lunn
2015-10-18  4:15         ` Dinh Nguyen
2015-10-18  5:54           ` Dinh Nguyen [this message]
2015-10-16 23:32 ` Sergei Shtylyov
2015-10-16 23:54   ` Andrew Lunn
2015-10-17 18:46     ` Sergei Shtylyov
2015-10-17 19:23     ` Sergei Shtylyov

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=alpine.DEB.2.02.1510180049590.20377@linux-builds1 \
    --to=dinguyen@opensource.altera.com \
    --cc=andrew@lunn.ch \
    --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