kernel: add support for kernel 5.4
[openwrt/openwrt.git] / target / linux / generic / backport-5.4 / 716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch
index 27ab78f3eebf8c6d1f7a72a9d81d3ebf647dbd2b..858c584c056bc1b65a8f63fd5f5022b1fcfe3dee 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
 
 --- a/drivers/net/phy/phylink.c
 +++ b/drivers/net/phy/phylink.c
-@@ -538,26 +538,17 @@ static const struct sfp_upstream_ops sfp
+@@ -565,26 +565,17 @@ static const struct sfp_upstream_ops sfp
  static int phylink_register_sfp(struct phylink *pl,
                                struct fwnode_handle *fwnode)
  {
@@ -33,12 +33,12 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
 -              if (ret == -ENOENT)
 -                      return 0;
 -
--              netdev_err(pl->netdev, "unable to parse \"sfp\" node: %d\n",
--                         ret);
+-              phylink_err(pl, "unable to parse \"sfp\" node: %d\n",
+-                          ret);
 +      bus = sfp_register_upstream_node(fwnode, pl, &sfp_phylink_ops);
 +      if (IS_ERR(bus)) {
 +              ret = PTR_ERR(bus);
-+              netdev_err(pl->netdev, "unable to attach SFP bus: %d\n", ret);
++              phylink_err(pl, "unable to attach SFP bus: %d\n", ret);
                return ret;
        }
  
@@ -51,7 +51,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
  }
 --- a/drivers/net/phy/sfp-bus.c
 +++ b/drivers/net/phy/sfp-bus.c
-@@ -3,6 +3,7 @@
+@@ -4,6 +4,7 @@
  #include <linux/list.h>
  #include <linux/mutex.h>
  #include <linux/phylink.h>
@@ -59,7 +59,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
  #include <linux/rtnetlink.h>
  #include <linux/slab.h>
  
-@@ -444,45 +445,63 @@ static void sfp_upstream_clear(struct sf
+@@ -445,45 +446,63 @@ static void sfp_upstream_clear(struct sf
  }
  
  /**