--- 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)
{
- 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;
}
}
--- 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>
#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
}
/**