vmac: reset phy to solve sometimes phy do not work when boot
authorhwg <hwg@rock-chips.com>
Thu, 27 Jun 2013 11:16:19 +0000 (19:16 +0800)
committerhwg <hwg@rock-chips.com>
Thu, 27 Jun 2013 11:16:53 +0000 (19:16 +0800)
drivers/net/rk29_vmac.c

index 7c445739d75752f6cbfe7fa228b4ef5b7d1c0590..d32da064eaad113f4fe13a7d5709caa2397a64fb 100755 (executable)
@@ -1070,8 +1070,11 @@ int vmac_open(struct net_device *dev)
        clk_enable(clk_get(NULL,"mac_ref"));\r
 \r
        //phy power on\r
-       if (pdata && pdata->rmii_power_control)\r
+       if (pdata && pdata->rmii_power_control) {\r
+        pdata->rmii_power_control(0);\r
+        msleep(100);\r
                pdata->rmii_power_control(1);\r
+    }\r
 \r
        msleep(1000);\r
 \r