net: mvneta: ensure PM paths take the rtnl lock
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 2 Jan 2018 17:24:34 +0000 (17:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Jan 2018 15:38:53 +0000 (10:38 -0500)
commit3b8bc67413dec0c693e6e79b41c92cf4931c8406
treef65c48e956fa99301e44560bb8db34f7b3195e78
parentd033a236bdda9f20417c66ea08bc185d9be29952
net: mvneta: ensure PM paths take the rtnl lock

The netdev core always ensures that the rtnl lock is held while calling
the ndo_open() and ndo_stop() methods. However, the suspend/resume paths
do not hold the rtnl lock. phylink will expect the rtnl lock to be held
when the MAC driver calls it, so we end up with kernel warnings. Take
the lock to ensure that these functions are called in a consistent
manner.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c