Skip to content

Commit ed3333f

Browse files
tlendackydavem330
authored andcommitted
amd-xgbe: Fixes for working with PHYs that support 2.5GbE
The driver has some missing functionality when operating in the mode that supports 2.5GbE. Fix the driver to fully recognize and support this speed. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 42d452d commit ed3333f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,6 +1966,8 @@ static enum xgbe_mode xgbe_phy_get_baset_mode(struct xgbe_phy_data *phy_data,
19661966
return XGBE_MODE_SGMII_100;
19671967
case SPEED_1000:
19681968
return XGBE_MODE_SGMII_1000;
1969+
case SPEED_2500:
1970+
return XGBE_MODE_KX_2500;
19691971
case SPEED_10000:
19701972
return XGBE_MODE_KR;
19711973
default:
@@ -2109,6 +2111,9 @@ static bool xgbe_phy_use_baset_mode(struct xgbe_prv_data *pdata,
21092111
case XGBE_MODE_SGMII_1000:
21102112
return xgbe_phy_check_mode(pdata, mode,
21112113
ADVERTISED_1000baseT_Full);
2114+
case XGBE_MODE_KX_2500:
2115+
return xgbe_phy_check_mode(pdata, mode,
2116+
ADVERTISED_2500baseX_Full);
21122117
case XGBE_MODE_KR:
21132118
return xgbe_phy_check_mode(pdata, mode,
21142119
ADVERTISED_10000baseT_Full);
@@ -2218,6 +2223,8 @@ static bool xgbe_phy_valid_speed_baset_mode(struct xgbe_phy_data *phy_data,
22182223
case SPEED_100:
22192224
case SPEED_1000:
22202225
return true;
2226+
case SPEED_2500:
2227+
return (phy_data->port_mode == XGBE_PORT_MODE_NBASE_T);
22212228
case SPEED_10000:
22222229
return (phy_data->port_mode == XGBE_PORT_MODE_10GBASE_T);
22232230
default:

0 commit comments

Comments
 (0)