kernel: backport phylink changes from mainline Linux
[openwrt/staging/jow.git] / target / linux / generic / backport-6.1 / 716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch
index 2e3826906079f1c47a9a60f33d8552aa57284369..3c7bf6c132ff5757a188895ece1d71523bdb7f87 100644 (file)
@@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
 
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1650,6 +1650,7 @@ int phy_package_join(struct phy_device *
+@@ -1648,6 +1648,7 @@ int phy_package_join(struct phy_device *
                        shared->priv_size = priv_size;
                }
                shared->base_addr = base_addr;
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
                refcount_set(&shared->refcnt, 1);
                bus->shared[base_addr] = shared;
        } else {
-@@ -1673,6 +1674,63 @@ err_unlock:
+@@ -1671,6 +1672,63 @@ err_unlock:
  EXPORT_SYMBOL_GPL(phy_package_join);
  
  /**
@@ -99,7 +99,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
   * phy_package_leave - leave a common PHY group
   * @phydev: target phy_device struct
   *
-@@ -1688,6 +1746,10 @@ void phy_package_leave(struct phy_device
+@@ -1686,6 +1744,10 @@ void phy_package_leave(struct phy_device
        if (!shared)
                return;
  
@@ -110,7 +110,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        if (refcount_dec_and_mutex_lock(&shared->refcnt, &bus->shared_lock)) {
                bus->shared[shared->base_addr] = NULL;
                mutex_unlock(&bus->shared_lock);
-@@ -1741,6 +1803,40 @@ int devm_phy_package_join(struct device
+@@ -1739,6 +1801,40 @@ int devm_phy_package_join(struct device
  EXPORT_SYMBOL_GPL(devm_phy_package_join);
  
  /**
@@ -170,7 +170,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        refcount_t refcnt;
        unsigned long flags;
        size_t priv_size;
-@@ -1765,9 +1768,12 @@ int phy_ethtool_set_link_ksettings(struc
+@@ -1793,9 +1796,12 @@ int phy_ethtool_set_link_ksettings(struc
                                   const struct ethtool_link_ksettings *cmd);
  int phy_ethtool_nway_reset(struct net_device *ndev);
  int phy_package_join(struct phy_device *phydev, int base_addr, size_t priv_size);