ethernet:gmac: fix the bug of connection failure with PHY because of wrong phy_addr
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / rockchip / gmac / stmmac_main.c
index 6ce9fee67db29b255d98438c3467a69b6b5fd8bd..4338bb0d824678d22abffae06b653fb83fa9bf25 100755 (executable)
@@ -91,7 +91,7 @@ static int debug = -1;
 module_param(debug, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "Message Level (-1: default, 0: no output, 16: all)");
 
-int phyaddr = 1;
+int phyaddr = -1;
 module_param(phyaddr, int, S_IRUGO);
 MODULE_PARM_DESC(phyaddr, "Physical device address");
 
@@ -2785,6 +2785,8 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device,
        /* Verify driver arguments */
        stmmac_verify_args();
 
+       priv->plat->phy_addr = -1;
+
        /* Override with kernel parameters if supplied XXX CRS XXX
         * this needs to have multiple instances
         */