Skip to content

Commit

Permalink
net: phy: c45: fix network interface initialization failures on xtens…
Browse files Browse the repository at this point in the history
…a, arm:cubieboard

Without proper initialization, "changed" returned random numbers and caused
interface initialization failures.

Fixes: 022c3f8 ("net: phy: add genphy_c45_ethtool_get/set_eee() support")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230225071644.2754893-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Oleksij Rempel authored and Jakub Kicinski committed Feb 27, 2023
1 parent ccf8f7d commit 972074e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/phy-c45.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ EXPORT_SYMBOL_GPL(genphy_c45_read_mdix);
*/
int genphy_c45_write_eee_adv(struct phy_device *phydev, unsigned long *adv)
{
int val, changed;
int val, changed = 0;

if (linkmode_intersects(phydev->supported_eee, PHY_EEE_CAP1_FEATURES)) {
val = linkmode_to_mii_eee_cap1_t(adv);
Expand Down

0 comments on commit 972074e

Please sign in to comment.