Skip to content

Commit 7e09f9d

Browse files
Russell King (Oracle)gregkh
authored andcommitted
net: phy: prefer 1000baseT over 1000baseKX
[ Upstream commit f20f94f ] The PHY settings table is supposed to be sorted by descending match priority - in other words, earlier entries are preferred over later entries. The order of 1000baseKX/Full and 1000baseT/Full is such that we prefer 1000baseKX/Full over 1000baseT/Full, but 1000baseKX/Full is a lot rarer than 1000baseT/Full, and thus is much less likely to be preferred. This causes phylink problems - it means a fixed link specifying a speed of 1G and full duplex gets an ethtool linkmode of 1000baseKX/Full rather than 1000baseT/Full as would be expected - and since we offer userspace a software emulation of a conventional copper PHY, we want to offer copper modes in preference to anything else. However, we do still want to allow the rarer modes as well. Hence, let's reorder these two modes to prefer copper. Tested-by: Tom Lendacky <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reported-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 4431333 commit 7e09f9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/phy/phy-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ static const struct phy_setting settings[] = {
161161
PHY_SETTING( 2500, FULL, 2500baseT_Full ),
162162
PHY_SETTING( 2500, FULL, 2500baseX_Full ),
163163
/* 1G */
164-
PHY_SETTING( 1000, FULL, 1000baseKX_Full ),
165164
PHY_SETTING( 1000, FULL, 1000baseT_Full ),
166165
PHY_SETTING( 1000, HALF, 1000baseT_Half ),
167166
PHY_SETTING( 1000, FULL, 1000baseT1_Full ),
168167
PHY_SETTING( 1000, FULL, 1000baseX_Full ),
168+
PHY_SETTING( 1000, FULL, 1000baseKX_Full ),
169169
/* 100M */
170170
PHY_SETTING( 100, FULL, 100baseT_Full ),
171171
PHY_SETTING( 100, FULL, 100baseT1_Full ),

0 commit comments

Comments
 (0)