UPSTREAM: 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: d765955d ("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> (cherry picked from commit 8a7493e5 https://github.com/torvalds/linux.git ) Signed-off-by:
Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by:
Vinod Koul <vkoul@kernel.org> Signed-off-by:
Khasim Syed Mohammed <khasim.mohammed@linaro.org> Change-Id: Ia443641ac312025059974c025bdefbb501202eac
Loading
Please sign in to comment