Skip to content

Commit f20f94f

Browse files
Russell King (Oracle)kuba-moo
Russell King (Oracle)
authored andcommitted
net: phy: prefer 1000baseT over 1000baseKX
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]>
1 parent 4177e49 commit f20f94f

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
@@ -162,11 +162,11 @@ static const struct phy_setting settings[] = {
162162
PHY_SETTING( 2500, FULL, 2500baseT_Full ),
163163
PHY_SETTING( 2500, FULL, 2500baseX_Full ),
164164
/* 1G */
165-
PHY_SETTING( 1000, FULL, 1000baseKX_Full ),
166165
PHY_SETTING( 1000, FULL, 1000baseT_Full ),
167166
PHY_SETTING( 1000, HALF, 1000baseT_Half ),
168167
PHY_SETTING( 1000, FULL, 1000baseT1_Full ),
169168
PHY_SETTING( 1000, FULL, 1000baseX_Full ),
169+
PHY_SETTING( 1000, FULL, 1000baseKX_Full ),
170170
/* 100M */
171171
PHY_SETTING( 100, FULL, 100baseT_Full ),
172172
PHY_SETTING( 100, FULL, 100baseT1_Full ),

0 commit comments

Comments
 (0)