From: Giuseppe CAVALLARO Date: Sun, 26 May 2013 21:31:28 +0000 (+0000) Subject: net: phy: fix a bug when verify the EEE support X-Git-Tag: upstream/snapshot3+hdmi~4979^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a9c56cb34e65000d1f0a4b7553399bfcf7c5a52;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git net: phy: fix a bug when verify the EEE support The phy_init_eee has to exit with an error when the local device and its link partner both do not support EEE. So this patch fixes a problem when verify this. Signed-off-by: Giuseppe Cavallaro Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index c14f147..38f0b31 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1044,7 +1044,7 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable) adv = mmd_eee_adv_to_ethtool_adv_t(eee_adv); lp = mmd_eee_adv_to_ethtool_adv_t(eee_lp); idx = phy_find_setting(phydev->speed, phydev->duplex); - if ((lp & adv & settings[idx].setting)) + if (!(lp & adv & settings[idx].setting)) goto eee_exit; if (clk_stop_enable) {