]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: stmmac: removed enabling eee in EEE set callback
authorVoon Weifeng <weifeng.voon@intel.com>
Wed, 23 Sep 2020 08:56:14 +0000 (16:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Oct 2020 09:55:52 +0000 (11:55 +0200)
commit046add2ce07c7bbc107cb82065dabf2a64873eb2
treeda1c8622281ea4cd8424d373a1a4198e84eee117
parentac25c357463b1dc5b88caa55139d996ae39b15e2
net: stmmac: removed enabling eee in EEE set callback

[ Upstream commit 7241c5a697479c7d0c5a96595822cdab750d41ae ]

EEE should be only be enabled during stmmac_mac_link_up() when the
link are up and being set up properly. set_eee should only do settings
configuration and disabling the eee.

Without this fix, turning on EEE using ethtool will return
"Operation not supported". This is due to the driver is in a dead loop
waiting for eee to be advertised in the for eee to be activated but the
driver will only configure the EEE advertisement after the eee is
activated.

Ethtool should only return "Operation not supported" if there is no EEE
capbility in the MAC controller.

Fixes: 8a7493e58ad6 ("net: stmmac: Fix a race in EEE enable callback")
Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
Acked-by: Mark Gross <mgross@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c