summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMengyuan Lou <mengyuanlou@net-swift.com>2024-08-20 11:04:25 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-29 17:33:59 +0200
commitb8d7b897e1e59f2cf4f95abea54bff9644328f9d (patch)
tree61a9b8746d60a708cf490b957b082cc365b29d3d
parent118fd997612d1efc94a86c307c6c6d659ebe29fc (diff)
net: ngbe: Fix phy mode set to external phy
commit f2916c83d746eb99f50f42c15cf4c47c2ea5f3b3 upstream. The MAC only has add the TX delay and it can not be modified. MAC and PHY are both set the TX delay cause transmission problems. So just disable TX delay in PHY, when use rgmii to attach to external phy, set PHY_INTERFACE_MODE_RGMII_RXID to phy drivers. And it is does not matter to internal phy. Fixes: bc2426d74aa3 ("net: ngbe: convert phylib to phylink") Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Cc: stable@vger.kernel.org # 6.3+ Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/E6759CF1387CF84C+20240820030425.93003-1-mengyuanlou@net-swift.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: mengyuanlou <mengyuanlou@net-swift.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c b/drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c
index 591f5b7b6da6..5007addd119a 100644
--- a/drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c
+++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c
@@ -215,10 +215,14 @@ int ngbe_phy_connect(struct wx *wx)
{
int ret;
+ /* The MAC only has add the Tx delay and it can not be modified.
+ * So just disable TX delay in PHY, and it is does not matter to
+ * internal phy.
+ */
ret = phy_connect_direct(wx->netdev,
wx->phydev,
ngbe_handle_link_change,
- PHY_INTERFACE_MODE_RGMII_ID);
+ PHY_INTERFACE_MODE_RGMII_RXID);
if (ret) {
wx_err(wx, "PHY connect failed.\n");
return ret;