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-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 Andrew Lunn
> > @@ -339,9 +340,19 @@ static int ksz9021_config_init(struct phy_device > > *phydev) > > { > > const struct device *dev = >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-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'

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,

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

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

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 Andrew Lunn
> > Maybe we need to walk up the hierarchy. > > > > Perhaps something like: > > > > const struct device *dev_walker; > > > > dev_walker = >dev; > > do { > >of_node = dev_walker->of_node; > >dev_walker = dev_walker->parent; > > } while (!of_node && dev_walker); > > > > The above code

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

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

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

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

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

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

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

SoCFPGA ethernet broken

2015-10-15 Thread Dinh Nguyen
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 appears that during DHCP, it cannot get an IP address. This only happens if ethernet was not

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,

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