Hello

On 3/16/2016 12:03 PM, Andreas Färber wrote:
Am 16.03.2016 um 12:01 schrieb Gabriel Fernandez:
Hi Pepe,

i have a kernel crash

[    2.714097] Unable to handle kernel NULL pointer dereference at
virtual address 000001d6
[    2.722188] pgd = c0204000
[    2.724886] [000001d6] *pgd=00000000
[    2.728452] Internal error: Oops: 5 [#1] SMP ARM
[    2.733054] Modules linked in:
[    2.736095] CPU: 1 PID: 1 Comm: swapper/0 Not tainted
4.5.0-rc7-01768-g3407893 #36
[    2.743649] Hardware name: STiH415/416 SoC with Flattened Device Tree
[    2.750074] task: ee070000 ti: ee05e000 task.ti: ee05e000
[    2.755467] PC is at stmmac_open+0xcc/0xc40
[    2.759641] LR is at of_phy_connect+0x44/0x5c


diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 
b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 4c5ce98..943500b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -278,7 +278,6 @@ static void stmmac_eee_ctrl_timer(unsigned long arg)
   */
  bool stmmac_eee_init(struct stmmac_priv *priv)
  {
-       char *phy_bus_name = priv->plat->phy_bus_name;
         unsigned long flags;
         bool ret = false;

@@ -290,7 +289,7 @@ bool stmmac_eee_init(struct stmmac_priv *priv)
                 goto out;

         /* Never init EEE in case of a switch is attached */
-       if (phy_bus_name && (!strcmp(phy_bus_name, "fixed")))
+       if (priv->phydev->is_pseudo_fixed_link)

priv->phydev is not yet affected
replace by if (phydev->is_pseudo_fixed_link) instead ?

Indeed that's how I had it in my own patch before. Thanks for spotting.


thanks for spotting and I have just sent the V2 of these patches
and I have understood why I did not catch it on my test :-(
my fault, sorry !

Cheers
Peppe


Regards,
Andreas


Reply via email to