net: stmmac: Hold rtnl lock in suspend/resume callbacks
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 13 Sep 2019 09:50:32 +0000 (11:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Sep 2019 07:11:09 +0000 (09:11 +0200)
commit19e13cb27b998ff49f07e399b5871bfe5ba7e3f0
tree05f47883dd7fad67008a1bd6dbf7c5261fa0d76b
parent28e486037747c2180470b77c290d4090ad42f259
net: stmmac: Hold rtnl lock in suspend/resume callbacks

We need to hold rnl lock in suspend and resume callbacks because phylink
requires it. Otherwise we will get a WARN() in suspend and resume.

Also, move phylink start and stop callbacks to inside device's internal
lock so that we prevent concurrent HW accesses.

Fixes: 74371272f97f ("net: stmmac: Convert to phylink and remove phylib logic")
Reported-by: Christophe ROULLIER <christophe.roullier@st.com>
Tested-by: Christophe ROULLIER <christophe.roullier@st.com>
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c