]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Sep 2020 01:08:06 +0000 (18:08 -0700)
commitb10560b2c30350089583c266fd268e6f81c69bf6
tree83aee7049275699cb67398d4f2b0d4a4533174f9
parent9a215bcf6adac8090b5959c38a7b01f0e4cf8cc2
net: stmmac: removed enabling eee in EEE set callback

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: c170706ff1d7 ("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>
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c