代码拉取完成,页面将自动刷新
同步操作将从 byxlk/rk-ethernet 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 22748ea..70e8f90 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -124,6 +124,7 @@ static void stmmac_exit_fs(struct net_device *dev);
#define STMMAC_COAL_TIMER(x) (jiffies + usecs_to_jiffies(x))
+static int phy_disable_eee(struct phy_device *phydev);
/**
* stmmac_verify_args - verify the driver parameters.
* Description: it checks the driver parameters and set a default in case of
@@ -873,6 +874,7 @@ static int stmmac_init_phy(struct net_device *dev)
" Link = %d\n", dev->name, phydev->phy_id, phydev->link);
priv->phydev = phydev;
+ phy_disable_eee(phydev);
return 0;
}
@@ -2834,6 +2836,39 @@ static int stmmac_hw_init(struct stmmac_priv *priv)
return 0;
}
+static int phy_disable_eee(struct phy_device *phydev)
+{
+ if (phydev->phy_id == 0x001cc816) { // rtl8201
+ printk("%s in\n", __func__);
+ phy_write(phydev, 31, 0x0004);
+ mdelay(10);
+ phy_write(phydev, 16, 0x4077);
+ phy_write(phydev, 31, 0x0000);
+ phy_write(phydev, 13, 0x0007);
+ phy_write(phydev, 14, 0x003C);
+ phy_write(phydev, 13, 0x4007);
+ phy_write(phydev, 14, 0x0000);
+ phy_write(phydev, 0, 0x1200);
+ } else if (phydev->phy_id == 0x001cc915) { // rtl8211e
+ printk("%s in\n", __func__);
+ phy_write(phydev, 31, 0x0000);
+ phy_write(phydev, 0, 0x8000);
+ mdelay(20);
+ phy_write(phydev, 31, 0x0a4b);
+ phy_write(phydev, 17, 0x1110);
+ phy_write(phydev, 31, 0x0000);
+ phy_write(phydev, 13, 0x0007);
+ phy_write(phydev, 14, 0x003c);
+ phy_write(phydev, 13, 0x4007);
+ phy_write(phydev, 14, 0x0000);
+ }
+
+ return 0;
+}
+
+
+
+
/**
* stmmac_dvr_probe
* @device: device pointer
@@ -3151,6 +3186,8 @@ int stmmac_resume(struct device *dev)
if (priv->phydev)
phy_start(priv->phydev);
+ phy_disable_eee(priv->phydev);
+
return 0;
}
EXPORT_SYMBOL_GPL(stmmac_resume);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。