generic: 6.6: refresh backport patches
[openwrt/staging/981213.git] / target / linux / generic / backport-6.6 / 714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch
index 6e5ac8c63ac9b274d80abcbde30dcd326de23e9a..b95f15a5818032886524da68b60c6ed27bf20e0d 100644 (file)
@@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        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.
   */
@@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  };
 --- 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();
        }
  
@@ -110,7 +110,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  }
  
  /* 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();
        }
  
@@ -121,7 +121,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  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
@@ -151,7 +151,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
   *
   * 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.
   */
@@ -172,7 +172,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        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;
                }
@@ -184,7 +184,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        } 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)) {
@@ -193,7 +193,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
                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
@@ -203,7 +203,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
   * @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,
@@ -212,7 +212,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  {
        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;
  
@@ -223,7 +223,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
                *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
@@ -233,7 +233,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
   * @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 {