Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: phy: don't set autoneg if it's not supported

In phy_device_create() we set phydev->autoneg = 1. This isn't changed
even if the PHY doesn't support autoneg. This seems to affect very
few PHY's, and they disable phydev->autoneg in their config_init
callback. So it's more of an improvement, therefore net-next.
The patch also wouldn't apply to older kernel versions because the
link mode bitmaps have been introduced recently.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Heiner Kallweit and committed by
David S. Miller
5e42574b 16111991

+4
+4
drivers/net/phy/phy_device.c
··· 2149 2149 if (err) 2150 2150 goto out; 2151 2151 2152 + if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, 2153 + phydev->supported)) 2154 + phydev->autoneg = 0; 2155 + 2152 2156 if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, 2153 2157 phydev->supported)) 2154 2158 phydev->is_gigabit_capable = 1;