lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 28 Apr 2019 15:03:37 +0200 From: Heiner Kallweit <hkallweit1@...il.com> To: Andrew Lunn <andrew@...n.ch>, Florian Fainelli <f.fainelli@...il.com>, David Miller <davem@...emloft.net> Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org> Subject: [PATCH net-next] net: phy: improve setting advertised modes in phy_probe So far we set the advertising bitmap before setting the pause flags in the supported bitmap. This may cause pause not being advertised. At least r8169 driver works around this by copying supported -> advertising on its own. The linkmode bitmaps have been introduced only recently, therefore the patch wouldn't apply to older versions. And behavior has been like this for years, therefore I'd consider it an improvement. Signed-off-by: Heiner Kallweit <hkallweit1@...il.com> --- drivers/net/phy/phy_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 2a2aaa5f3..c56897db2 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -2177,7 +2177,6 @@ static int phy_probe(struct device *dev) phydev->is_gigabit_capable = 1; of_set_phy_supported(phydev); - linkmode_copy(phydev->advertising, phydev->supported); /* Get the EEE modes we want to prohibit. We will ask * the PHY stop advertising these mode later on @@ -2203,6 +2202,8 @@ static int phy_probe(struct device *dev) phydev->supported); } + linkmode_copy(phydev->advertising, phydev->supported); + /* Set the state to READY by default */ phydev->state = PHY_READY; -- 2.21.0
Powered by blists - more mailing lists