Re: SoCFPGA ethernet broken
From: Dinh Nguyen
Date: Mon Oct 19 2015 - 06:58:02 EST
On Mon, 19 Oct 2015, Dinh Nguyen wrote:
+CC Giuseppe Cavallaro
+CC STi and Rockchip Maintainers
This is approaching beyond my breadth of knowledge on this subject, so I just
wanted to get some further insight.
>
> On Fri, 16 Oct 2015, 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....
> >
>
AFAICT, the stmmac driver is allowing for the phy node to be part of the mdio.
In the function, stmmac_init_phy(), there is a separate check of a standalone
phy_node, and the case where the phy is part of the mdio.
commit "8b63ec1837fa phylib: Make PHYs children of their MDIO bus, not
the bus' parent." is now now placing a hard requirement that the phy must be
in a separate node. For now, this is breaking SoCFPGA, but I think it may also
impact Rockchip and STi?
> > If phydev->attached_dev->dev->of_node works, that would be my
> > preference.
> >
BR,
Dinh
--
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/