summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2018-02-27 03:56:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-19 10:42:44 +0300
commit6bccf8962b7874a2e66c2f78c9e48e0a7012c541 (patch)
tree68ec8c0db1875deea6b808b70f15e2176daadad7 /include
parent76fbc152cd8c95369b0527b5d5cb1e166033ab84 (diff)
downloadlinux-6bccf8962b7874a2e66c2f78c9e48e0a7012c541.tar.xz
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/phy.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index d78cd01ea513..600076e1ce84 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -817,6 +817,7 @@ void phy_device_remove(struct phy_device *phydev);
int phy_init_hw(struct phy_device *phydev);
int phy_suspend(struct phy_device *phydev);
int phy_resume(struct phy_device *phydev);
+int __phy_resume(struct phy_device *phydev);
int phy_loopback(struct phy_device *phydev, bool enable);
struct phy_device *phy_attach(struct net_device *dev, const char *bus_id,
phy_interface_t interface);