Re: Kernel crashes in phy_attach_direct()

2017-02-08 Thread Florian Fainelli
On 02/08/2017 06:51 AM, Andrew Lunn wrote: >> Yes, this is what I am using right now: >> >> --- a/drivers/net/phy/phy_device.c >> +++ b/drivers/net/phy/phy_device.c >> @@ -920,11 +920,6 @@ int phy_attach_direct(struct net_device *dev, >> struct phy_device *phydev, >> return -EIO;

Re: Kernel crashes in phy_attach_direct()

2017-02-08 Thread Andrew Lunn
> Yes, this is what I am using right now: > > --- a/drivers/net/phy/phy_device.c > +++ b/drivers/net/phy/phy_device.c > @@ -920,11 +920,6 @@ int phy_attach_direct(struct net_device *dev, > struct phy_device *phydev, > return -EIO; > } > > - if (!try_module_get(d->dri

Re: Kernel crashes in phy_attach_direct()

2017-02-08 Thread Andrew Lunn
On Wed, Feb 08, 2017 at 10:58:57AM -0200, Fabio Estevam wrote: > Hi, > > I am getting the following kernel crash with linux-next 20170208 > running on a imx53-qsb board. > > Any ideas? Hi Fabio Could you try reverting: commit cafe8df8b9bc9aa3dffa827c1a6757c6cd36f657 Author: Mao Wenan Date:

Re: Kernel crashes in phy_attach_direct()

2017-02-08 Thread Andrew Lunn
> Yes, after reverting this commit I no longer get the kernel crash. And i guess you don't have a specific PHY driver for you PHYs. You are using the generic PHY driver? Could you try modifying phy_attach_direct() such that the try_module_get() is after: /* Assume that if there is no driv

Re: Kernel crashes in phy_attach_direct()

2017-02-08 Thread Fabio Estevam
On Wed, Feb 8, 2017 at 12:40 PM, Andrew Lunn wrote: > And i guess you don't have a specific PHY driver for you PHYs. You are > using the generic PHY driver? Yes, I am: Generic PHY 63fec000.ethernet-1:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=63fec000.ethernet-1:00, irq=-1) > > Cou

Re: Kernel crashes in phy_attach_direct()

2017-02-08 Thread Nikita Yushchenko
> Hi, > > I am getting the following kernel crash with linux-next 20170208 > running on a imx53-qsb board. > > Any ideas? Same here, on zii-dev-revB and zii-dev-revC boards. Crash is in phy_attach_direct() in line if (!try_module_get(d->driver->owner)) { caused by d->driver being NULL. Nik

Re: Kernel crashes in phy_attach_direct()

2017-02-08 Thread Fabio Estevam
Hi Andrew, On Wed, Feb 8, 2017 at 12:28 PM, Andrew Lunn wrote: > Hi Fabio > > Could you try reverting: > > commit cafe8df8b9bc9aa3dffa827c1a6757c6cd36f657 > Author: Mao Wenan > Date: Tue Jan 31 18:46:43 2017 -0800 > > net: phy: Fix lack of reference count on PHY driver > > There is cu

Kernel crashes in phy_attach_direct()

2017-02-08 Thread Fabio Estevam
Hi, I am getting the following kernel crash with linux-next 20170208 running on a imx53-qsb board. Any ideas? Thanks Unable to handle kernel NULL pointer dereference at virtual address 0008 pgd = c0004000 [0008] *pgd= Internal error: Oops: 5 [#1] SMP ARM Modules linked in: