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 07:46:23 +0000 (09:46 +0200)
commit4c30fd07ca40da56760f2823f61246fa5d5f4247
tree53b27a09366d019e2e551dcdf1ee41b8ca73cb51
parentb932860a1168f2b99e63b30ed8c1ffb53915d2b7
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