Re: SoCFPGA ethernet broken

2015-12-04 Thread Andrew Lunn
> > @@ -339,9 +340,19 @@ 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) > >

Re: SoCFPGA ethernet broken

2015-12-04 Thread Dinh Nguyen
Hi Andrew, On Fri, 4 Dec 2015, Andrew Lunn wrote: > On Fri, Dec 04, 2015 at 02:10:50AM +0100, Andrew Lunn wrote: > > > > FWIW: My initial patch to address the failure worked with the original > > > > DTB. > > > > > > Can I ask what patch are you referring to? I was sidetracked for a while > > >

Re: SoCFPGA ethernet broken

2015-12-04 Thread Pavel Machek
> >While updating DTS might be good idea, I don't think you can simply > >blame this on DTS. If it worked before the change, it is supposed to > >work after the change, otherwise we call that change a "regression" > >and revert the change. > > FWIW: My initial patch to address the failure worked

Re: SoCFPGA ethernet broken

2015-12-03 Thread Andrew Lunn
On Fri, Dec 04, 2015 at 02:10:50AM +0100, Andrew Lunn wrote: > > > FWIW: My initial patch to address the failure worked with the original > > > DTB. > > > > Can I ask what patch are you referring to? I was sidetracked for a while > > on this issue, but I still see it failing as of v4.4-rc3. I'll

Re: SoCFPGA ethernet broken

2015-12-03 Thread Andrew Lunn
> > FWIW: My initial patch to address the failure worked with the original DTB. > > Can I ask what patch are you referring to? I was sidetracked for a while > on this issue, but I still see it failing as of v4.4-rc3. I'll try to > get back to debugging this. Hi Dinh There are two different patch

Re: SoCFPGA ethernet broken

2015-12-03 Thread Dinh Nguyen
On 12/03/2015 03:23 PM, David Daney wrote: > On 12/03/2015 12:48 PM, Pavel Machek wrote: >> On Thu 2015-10-15 13:25:59, Florian Fainelli wrote: >>> On 15/10/15 12:59, Dinh Nguyen wrote: On 10/15/2015 03:03 PM, Florian Fainelli wrote: > On 15/10/15 12:09, Dinh Nguyen wrote: >> Hi, >

Re: SoCFPGA ethernet broken

2015-12-03 Thread David Daney
On 12/03/2015 12:48 PM, Pavel Machek wrote: On Thu 2015-10-15 13:25:59, Florian Fainelli wrote: On 15/10/15 12:59, Dinh Nguyen wrote: On 10/15/2015 03:03 PM, Florian Fainelli wrote: On 15/10/15 12:09, Dinh Nguyen wrote: Hi, commit "8b63ec1837fa phylib: Make PHYs children of their MDIO bus, n

Re: SoCFPGA ethernet broken

2015-12-03 Thread Pavel Machek
On Thu 2015-10-15 13:25:59, Florian Fainelli wrote: > On 15/10/15 12:59, Dinh Nguyen wrote: > > On 10/15/2015 03:03 PM, Florian Fainelli wrote: > >> On 15/10/15 12:09, Dinh Nguyen wrote: > >>> Hi, > >>> > >>> commit "8b63ec1837fa phylib: Make PHYs children of their MDIO bus, not > >>> the bus' pare

Re: SoCFPGA ethernet broken

2015-10-19 Thread Dinh Nguyen
+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: > >

Re: SoCFPGA ethernet broken

2015-10-19 Thread Dinh Nguyen
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 h

Re: SoCFPGA ethernet broken

2015-10-16 Thread Andrew Lunn
On Fri, Oct 16, 2015 at 01:24:16PM -0700, David Daney wrote: > 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 = de

Re: SoCFPGA ethernet broken

2015-10-16 Thread David Daney
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 cod

Re: SoCFPGA ethernet broken

2015-10-16 Thread Andrew Lunn
> > 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

Re: SoCFPGA ethernet broken

2015-10-16 Thread Dinh Nguyen
On Fri, 16 Oct 2015, David Daney wrote: > On 10/16/2015 08:56 AM, Andrew Lunn wrote: > > > So I think I'll move to inspect what Florian had suggested, and that was > > > to look > > > at: > > > drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c::stmmac_mdio_register > > > > I have a suspicion. If

Re: SoCFPGA ethernet broken

2015-10-16 Thread Florian Fainelli
On 16/10/15 08:56, Andrew Lunn wrote: >> So I think I'll move to inspect what Florian had suggested, and that was to >> look >> at: drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c::stmmac_mdio_register > > I have a suspicion. If you look at the phy driver it does: > > static int ksz9021_confi

Re: SoCFPGA ethernet broken

2015-10-16 Thread David Daney
On 10/16/2015 08:56 AM, Andrew Lunn wrote: So I think I'll move to inspect what Florian had suggested, and that was to look at: drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c::stmmac_mdio_register I have a suspicion. If you look at the phy driver it does: static int ksz9021_config_init(stru

Re: SoCFPGA ethernet broken

2015-10-16 Thread Andrew Lunn
> So I think I'll move to inspect what Florian had suggested, and that was to > look > at: drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c::stmmac_mdio_register I have a suspicion. If you look at the phy driver it does: static int ksz9021_config_init(struct phy_device *phydev) { const

Re: SoCFPGA ethernet broken

2015-10-16 Thread Dinh Nguyen
On Fri, 16 Oct 2015, Andrew Lunn wrote: > On Fri, Oct 16, 2015 at 09:38:37AM -0500, Dinh Nguyen wrote: > > On Fri, 16 Oct 2015, Andrew Lunn wrote: > > > > > > Another debugging point, the SoCFPGA board has a Micrel ksz9021 PHY > > > > attached > > > > to the ethernet port. What I'm seeing is tha

Re: SoCFPGA ethernet broken

2015-10-16 Thread Andrew Lunn
On Fri, Oct 16, 2015 at 09:38:37AM -0500, Dinh Nguyen wrote: > On Fri, 16 Oct 2015, Andrew Lunn wrote: > > > > Another debugging point, the SoCFPGA board has a Micrel ksz9021 PHY > > > attached > > > to the ethernet port. What I'm seeing is that with 8b63ec1837fa patch, > > > when > > > the call

Re: SoCFPGA ethernet broken

2015-10-16 Thread Dinh Nguyen
On Fri, 16 Oct 2015, Andrew Lunn wrote: > > Another debugging point, the SoCFPGA board has a Micrel ksz9021 PHY attached > > to the ethernet port. What I'm seeing is that with 8b63ec1837fa patch, when > > the call to ksz9021_config_init() is made both of_node and > > dev->parent->of_node > > are

Re: SoCFPGA ethernet broken

2015-10-15 Thread Andrew Lunn
> Another debugging point, the SoCFPGA board has a Micrel ksz9021 PHY attached > to the ethernet port. What I'm seeing is that with 8b63ec1837fa patch, when > the call to ksz9021_config_init() is made both of_node and > dev->parent->of_node > are NULL, without the patch the dev->parent->of_node is

Re: SoCFPGA ethernet broken

2015-10-15 Thread Dinh Nguyen
On Thu, 15 Oct 2015, Florian Fainelli wrote: > On 15/10/15 13:49, Dinh Nguyen wrote: > >> > >> Does this text change with and without the 8b63ec1837fa patch? > > > > No, this text does not change with/without the 8b63ec1837fa patch. > > Could you instrument mdiobus_scan(), get_phy_device() and >

Re: SoCFPGA ethernet broken

2015-10-15 Thread Dinh Nguyen
On Thu, 15 Oct 2015, Florian Fainelli wrote: > On 15/10/15 13:49, Dinh Nguyen wrote: > >> > >> Does this text change with and without the 8b63ec1837fa patch? > > > > No, this text does not change with/without the 8b63ec1837fa patch. > > Could you instrument mdiobus_scan(), get_phy_device() and >

Re: SoCFPGA ethernet broken

2015-10-15 Thread Florian Fainelli
On 15/10/15 13:49, Dinh Nguyen wrote: >> >> Does this text change with and without the 8b63ec1837fa patch? > > No, this text does not change with/without the 8b63ec1837fa patch. Could you instrument mdiobus_scan(), get_phy_device() and phy_device_create/register to see if the parent is NULL, non-

Re: SoCFPGA ethernet broken

2015-10-15 Thread Dinh Nguyen
On 10/15/2015 03:35 PM, David Daney wrote: > On 10/15/2015 01:25 PM, Florian Fainelli wrote: >> On 15/10/15 12:59, Dinh Nguyen wrote: >>> On 10/15/2015 03:03 PM, Florian Fainelli wrote: On 15/10/15 12:09, Dinh Nguyen wrote: > Hi, > > commit "8b63ec1837fa phylib: Make PHYs children

Re: SoCFPGA ethernet broken

2015-10-15 Thread David Daney
On 10/15/2015 01:25 PM, Florian Fainelli wrote: On 15/10/15 12:59, Dinh Nguyen wrote: On 10/15/2015 03:03 PM, Florian Fainelli wrote: On 15/10/15 12:09, Dinh Nguyen wrote: Hi, commit "8b63ec1837fa phylib: Make PHYs children of their MDIO bus, not the bus' parent." seems to have broken etherne

Re: SoCFPGA ethernet broken

2015-10-15 Thread Florian Fainelli
On 15/10/15 12:59, Dinh Nguyen wrote: > On 10/15/2015 03:03 PM, Florian Fainelli wrote: >> On 15/10/15 12:09, Dinh Nguyen wrote: >>> Hi, >>> >>> commit "8b63ec1837fa phylib: Make PHYs children of their MDIO bus, not >>> the bus' parent." seems to have broken ethernet support for the SoCFPGA >>> pla

Re: SoCFPGA ethernet broken

2015-10-15 Thread Dinh Nguyen
On 10/15/2015 03:03 PM, Florian Fainelli wrote: > On 15/10/15 12:09, Dinh Nguyen wrote: >> Hi, >> >> commit "8b63ec1837fa phylib: Make PHYs children of their MDIO bus, not >> the bus' parent." seems to have broken ethernet support for the SoCFPGA >> platform which is using the stmmac ethernet drive

Re: SoCFPGA ethernet broken

2015-10-15 Thread Florian Fainelli
On 15/10/15 12:09, Dinh Nguyen wrote: > Hi, > > commit "8b63ec1837fa phylib: Make PHYs children of their MDIO bus, not > the bus' parent." seems to have broken ethernet support for the SoCFPGA > platform which is using the stmmac ethernet driver. It is not clear to me how this relates to what you