net: phy: Restore phy_resume() locking assumption
authorAndrew Lunn <andrew@lunn.ch>
Tue, 27 Feb 2018 00:56:06 +0000 (01:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 07:42:44 +0000 (08:42 +0100)
commit6bccf8962b7874a2e66c2f78c9e48e0a7012c541
tree68ec8c0db1875deea6b808b70f15e2176daadad7
parent76fbc152cd8c95369b0527b5d5cb1e166033ab84
net: phy: Restore phy_resume() locking assumption

commit 9c2c2e62df3fa30fb13fbeb7512a4eede729383b upstream.

commit f5e64032a799 ("net: phy: fix resume handling") changes the
locking semantics for phy_resume() such that the caller now needs to
hold the phy mutex. Not all call sites were adopted to this new
semantic, resulting in warnings from the added
WARN_ON(!mutex_is_locked(&phydev->lock)).  Rather than change the
semantics, add a __phy_resume() and restore the old behavior of
phy_resume().

Reported-by: Heiner Kallweit <hkallweit1@gmail.com>
Fixes: f5e64032a799 ("net: phy: fix resume handling")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/phy.c
drivers/net/phy/phy_device.c
include/linux/phy.h