Re: SoCFPGA ethernet broken

From: Andrew Lunn
Date: Fri Oct 16 2015 - 15:39:06 EST


> > 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....

If phydev->attached_dev->dev->of_node works, that would be my
preference.

Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/