代码拉取完成,页面将自动刷新
同步操作将从 byxlk/rk-ethernet 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff --git a/kernel/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/kernel/drivers/net/ethernet//stmicro/stmmac/stmmac_main.c
index ad0003a..989c9fb 100755
--- a/kernel/drivers/net/ethernet/rockchip/gmac/stmmac_main.c
+++ b/kernel/drivers/net/ethernet/rockchip/gmac/stmmac_main.c
@@ -149,6 +149,8 @@ static void stmmac_exit_fs(void);
#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 verifies if some wrong parameter is passed to the driver.
@@ -945,6 +947,8 @@ 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);
gmac_create_sysfs(phydev);
@@ -2748,6 +2752,24 @@ 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
@@ -3012,6 +3034,8 @@ int stmmac_resume(struct net_device *ndev)
if (priv->phydev)
phy_start(priv->phydev);
+
+ phy_disable_eee(priv->phydev);
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。