X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fgeneric%2Fpending-5.4%2F751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch;h=d58304410a0d907f7b856899aeeec6b83f93934d;hb=4e0c54bc5bc8;hp=1724d445b7087191fce2e359d024800c7ab46953;hpb=c16517d26de30c90dabce1e456615fd7fbdce07c;p=openwrt%2Fopenwrt.git diff --git a/target/linux/generic/pending-5.4/751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch b/target/linux/generic/pending-5.4/751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch index 1724d445b7..d58304410a 100644 --- a/target/linux/generic/pending-5.4/751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch +++ b/target/linux/generic/pending-5.4/751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch @@ -1,7 +1,7 @@ -From 3d8592a23dd67fb78ad85ddf711a059d3880fcb4 Mon Sep 17 00:00:00 2001 +From 7adb5b2126bc013f0964ddaefad6ad1b132e86c3 Mon Sep 17 00:00:00 2001 From: Russell King -Date: Fri, 8 Nov 2019 17:19:16 +0000 -Subject: [PATCH 654/660] net: phylink: make Broadcom BCM84881 based SFPs work +Date: Wed, 11 Dec 2019 10:56:50 +0000 +Subject: [PATCH] net: phylink: make Broadcom BCM84881 based SFPs work The Broadcom BCM84881 does not appear to send the SGMII control word when operating in SGMII mode, which causes network adapters to fail @@ -11,14 +11,16 @@ the PHY negotiated 100M. Work around this by detecting the Broadcom BCM84881 and switch to phy mode rather than inband mode. +Reviewed-by: Florian Fainelli Signed-off-by: Russell King +Signed-off-by: David S. Miller --- - drivers/net/phy/phylink.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) + drivers/net/phy/phylink.c | 18 ++++++++++++++++-- + 1 file changed, 16 insertions(+), 2 deletions(-) --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1787,12 +1787,22 @@ static void phylink_sfp_link_up(void *up +@@ -1842,10 +1842,20 @@ static void phylink_sfp_link_up(void *up phylink_run_resolve(pl); } @@ -34,16 +36,14 @@ Signed-off-by: Russell King static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy) { struct phylink *pl = upstream; - __ETHTOOL_DECLARE_LINK_MODE_MASK(supported); - __ETHTOOL_DECLARE_LINK_MODE_MASK(advertising); phy_interface_t interface; + u8 mode; int ret; /* -@@ -1807,8 +1817,13 @@ static int phylink_sfp_connect_phy(void - ethtool_convert_legacy_u32_to_link_mode(supported, phy->supported); - ethtool_convert_legacy_u32_to_link_mode(advertising, phy->advertising); +@@ -1857,9 +1867,13 @@ static int phylink_sfp_connect_phy(void + */ + phy_support_asym_pause(phy); + if (phylink_phy_no_inband(phy)) + mode = MLO_AN_PHY; @@ -51,8 +51,9 @@ Signed-off-by: Russell King + mode = MLO_AN_INBAND; + /* Do the initial configuration */ -- ret = phylink_sfp_config(pl, ML_AN_INBAND, supported, advertising); -+ ret = phylink_sfp_config(pl, mode, supported, advertising); +- ret = phylink_sfp_config(pl, MLO_AN_INBAND, phy->supported, +- phy->advertising); ++ ret = phylink_sfp_config(pl, mode, phy->supported, phy->advertising); if (ret < 0) return ret;