Linux/linux 8a7493edrivers/net/ethernet/stmicro/stmmac stmmac_ethtool.c

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 at synopsys.com>
Fixes: d765955d2ae0 ("stmmac: add the Energy Efficient Ethernet support")
Cc: Joao Pinto <jpinto at synopsys.com>
Cc: David S. Miller <davem at davemloft.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro at st.com>
Cc: Alexandre Torgue <alexandre.torgue at st.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
DeltaFile
+12-10drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+12-101 files

UnifiedSplitRaw