Skip to content

Commit f2916c8

Browse files
Mengyuan LouPaolo Abeni
authored andcommitted
net: ngbe: Fix phy mode set to external phy
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]>
1 parent a0b4a80 commit f2916c8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,12 @@ static int ngbe_phylink_init(struct wx *wx)
124124
MAC_SYM_PAUSE | MAC_ASYM_PAUSE;
125125
config->mac_managed_pm = true;
126126

127-
phy_mode = PHY_INTERFACE_MODE_RGMII_ID;
128-
__set_bit(PHY_INTERFACE_MODE_RGMII_ID, config->supported_interfaces);
127+
/* The MAC only has add the Tx delay and it can not be modified.
128+
* So just disable TX delay in PHY, and it is does not matter to
129+
* internal phy.
130+
*/
131+
phy_mode = PHY_INTERFACE_MODE_RGMII_RXID;
132+
__set_bit(PHY_INTERFACE_MODE_RGMII_RXID, config->supported_interfaces);
129133

130134
phylink = phylink_create(config, NULL, phy_mode, &ngbe_mac_ops);
131135
if (IS_ERR(phylink))

0 commit comments

Comments
 (0)