]> 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)
commitee3e21f6b96542417bf97f114fdc6ebf035dc85a
tree83aee7049275699cb67398d4f2b0d4a4533174f9
parenta90784a4c3b6c09fbf1a93b2d71c729e3631ddca
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: c500a60e6d13 ("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