[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56215CF0.6080905@caviumnetworks.com>
Date: Fri, 16 Oct 2015 13:24:16 -0700
From: David Daney <ddaney@...iumnetworks.com>
To: Andrew Lunn <andrew@...n.ch>
CC: Dinh Nguyen <dinguyen@...nsource.altera.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>, <david.daney@...ium.com>,
<netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: SoCFPGA ethernet broken
On 10/16/2015 12:38 PM, Andrew Lunn wrote:
>>> Maybe we need to walk up the hierarchy.
>>>
>>> Perhaps something like:
>>>
>>> const struct device *dev_walker;
>>>
>>> dev_walker = &phydev->dev;
>>> do {
>>> of_node = dev_walker->of_node;
>>> dev_walker = dev_walker->parent;
>>> } while (!of_node && dev_walker);
>>>
>>
>> The above code seems to have fixed the issue.
>
> What i don't like about this is that it allows you to put these
> properties in the mdio device node. These are phy properties, not mdio
> properties....
Yes, we know that the device tree is not correctly formed.
You have a choice:
A) Fix the device tree and any code that may have to change to work with
a good device tree.
B) Change the code to work with the screwy existing device tree. The
above seems to work, other things may also be possible.
I can't really make any decisions as to what the best way to proceed is,
as I neither have the hardware in question, nor the time to work on it.
David Daney
>
> If phydev->attached_dev->dev->of_node works, that would be my
> preference.
>
> Andrew
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists