phy_unlock_mdio_bus(phydev);
--- a/drivers/net/phy/mscc/mscc.h
+++ b/drivers/net/phy/mscc/mscc.h
-@@ -414,6 +414,11 @@ struct vsc8531_private {
+@@ -416,6 +416,11 @@ struct vsc8531_private {
* gpio_lock: used for PHC operations. Common for all PHYs as the load/save GPIO
* is shared.
*/
};
--- a/drivers/net/phy/mscc/mscc_main.c
+++ b/drivers/net/phy/mscc/mscc_main.c
-@@ -700,7 +700,7 @@ int phy_base_write(struct phy_device *ph
+@@ -711,7 +711,7 @@ int phy_base_write(struct phy_device *ph
dump_stack();
}
}
/* phydev->bus->mdio_lock should be locked when using this function */
-@@ -711,7 +711,7 @@ int phy_base_read(struct phy_device *phy
+@@ -722,7 +722,7 @@ int phy_base_read(struct phy_device *phy
dump_stack();
}
u32 vsc85xx_csr_read(struct phy_device *phydev,
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1602,20 +1602,22 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1
+@@ -1650,20 +1650,22 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1
/**
* phy_package_join - join a common PHY group
* @phydev: target phy_device struct
*
* This will set the shared pointer of the phydev to the shared storage.
* If this is the first call for a this cookie the shared storage will be
-@@ -1625,17 +1627,17 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1
+@@ -1673,17 +1675,17 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1
* Returns < 1 on error, 0 on success. Esp. calling phy_package_join()
* with the same cookie but a different priv_size is an error.
*/
if (!shared) {
ret = -ENOMEM;
shared = kzalloc(sizeof(*shared), GFP_KERNEL);
-@@ -1647,9 +1649,9 @@ int phy_package_join(struct phy_device *
+@@ -1695,9 +1697,9 @@ int phy_package_join(struct phy_device *
goto err_free;
shared->priv_size = priv_size;
}
} else {
ret = -EINVAL;
if (priv_size && priv_size != shared->priv_size)
-@@ -1687,7 +1689,7 @@ void phy_package_leave(struct phy_device
+@@ -1735,7 +1737,7 @@ void phy_package_leave(struct phy_device
return;
if (refcount_dec_and_mutex_lock(&shared->refcnt, &bus->shared_lock)) {
mutex_unlock(&bus->shared_lock);
kfree(shared->priv);
kfree(shared);
-@@ -1706,7 +1708,8 @@ static void devm_phy_package_leave(struc
+@@ -1754,7 +1756,8 @@ static void devm_phy_package_leave(struc
* devm_phy_package_join - resource managed phy_package_join()
* @dev: device that is registering this PHY package
* @phydev: target phy_device struct
* @priv_size: if non-zero allocate this amount of bytes for private data
*
* Managed phy_package_join(). Shared storage fetched by this function,
-@@ -1714,7 +1717,7 @@ static void devm_phy_package_leave(struc
+@@ -1762,7 +1765,7 @@ static void devm_phy_package_leave(struc
* phy_package_join() for more information.
*/
int devm_phy_package_join(struct device *dev, struct phy_device *phydev,
{
struct phy_device **ptr;
int ret;
-@@ -1724,7 +1727,7 @@ int devm_phy_package_join(struct device
+@@ -1772,7 +1775,7 @@ int devm_phy_package_join(struct device
if (!ptr)
return -ENOMEM;
*ptr = phydev;
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
-@@ -319,7 +319,8 @@ struct mdio_bus_stats {
+@@ -327,7 +327,8 @@ struct mdio_bus_stats {
/**
* struct phy_package_shared - Shared information in PHY packages
* @refcnt: Number of PHYs connected to this shared data
* @flags: Initialization of PHY package
* @priv_size: Size of the shared private data @priv
-@@ -330,7 +331,7 @@ struct mdio_bus_stats {
+@@ -338,7 +339,7 @@ struct mdio_bus_stats {
* phy_package_leave().
*/
struct phy_package_shared {