Skip to content

Commit

Permalink
net: ngbe: Fix phy mode set to external phy
Browse files Browse the repository at this point in the history
commit f2916c8 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: bc2426d ("net: ngbe: convert phylib to phylink")
Signed-off-by: Mengyuan Lou <[email protected]>
Cc: [email protected] # 6.3+
Reviewed-by: Jacob Keller <[email protected]>
Link: https://patch.msgid.link/E6759CF1387CF84C+20240820030425.93003-1-mengyuanlou@net-swift.com
Signed-off-by: Paolo Abeni <[email protected]>
Signed-off-by: mengyuanlou <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Mengyuan Lou authored and gregkh committed Aug 29, 2024
1 parent 118fd99 commit b8d7b89
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b8d7b89

Please sign in to comment.