]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: Fix a race in EEE enable callback
authorJose Abreu <jose.abreu@synopsys.com>
Mon, 18 Feb 2019 13:35:03 +0000 (14:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Feb 2019 01:39:11 +0000 (17:39 -0800)
commitc500a60e6d13d48aa1d8a0d5bff2a63bb24ac6d4
tree7bed5d973606e75cb3ba9e2bf3c1fe441de0cbe8
parent248f362a4d64e245d035b50d672f7a30afaffb95
net: stmmac: Fix a race in EEE enable callback

We are saving the status of EEE even before we try to enable it. This
leads to a race with XMIT function that tries to arm EEE timer before we
set it up.

Fix this by only saving the EEE parameters after all operations are
performed with success.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Fixes: 6d1634718fa8 ("stmmac: add the Energy Efficient Ethernet support")
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c