diff --git a/target/linux/generic/backport-4.19/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch b/target/linux/generic/backport-4.19/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch index 1a7726b224..4825227ee4 100644 --- a/target/linux/generic/backport-4.19/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch +++ b/target/linux/generic/backport-4.19/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch @@ -16,7 +16,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -538,20 +538,13 @@ static const struct sfp_upstream_ops sfp +@@ -538,31 +538,17 @@ static const struct sfp_upstream_ops sfp static int phylink_register_sfp(struct phylink *pl, struct fwnode_handle *fwnode) { @@ -42,10 +42,11 @@ Signed-off-by: Russell King return ret; } -@@ -560,9 +553,7 @@ static int phylink_register_sfp(struct p - return 0; - } - +- if (!fwnode_device_is_available(ref.fwnode)) { +- fwnode_handle_put(ref.fwnode); +- return 0; +- } +- - pl->sfp_bus = sfp_register_upstream(ref.fwnode, pl, &sfp_phylink_ops); - if (!pl->sfp_bus) - return -ENOMEM; diff --git a/target/linux/generic/backport-4.19/717-v5.5-net-sfp-rework-upstream-interface.patch b/target/linux/generic/backport-4.19/717-v5.5-net-sfp-rework-upstream-interface.patch index ac77b32a42..a901b15aaf 100644 --- a/target/linux/generic/backport-4.19/717-v5.5-net-sfp-rework-upstream-interface.patch +++ b/target/linux/generic/backport-4.19/717-v5.5-net-sfp-rework-upstream-interface.patch @@ -29,7 +29,7 @@ Signed-off-by: Russell King if (IS_ERR(bus)) { ret = PTR_ERR(bus); netdev_err(pl->netdev, "unable to attach SFP bus: %d\n", ret); -@@ -555,7 +555,10 @@ static int phylink_register_sfp(struct p +@@ -550,7 +550,10 @@ static int phylink_register_sfp(struct p pl->sfp_bus = bus; @@ -41,7 +41,7 @@ Signed-off-by: Russell King } /** -@@ -639,8 +642,7 @@ EXPORT_SYMBOL_GPL(phylink_create); +@@ -634,8 +637,7 @@ EXPORT_SYMBOL_GPL(phylink_create); */ void phylink_destroy(struct phylink *pl) { diff --git a/target/linux/generic/backport-4.19/739-v5.5-net-phylink-update-to-use-phy_support_asym_pause.patch b/target/linux/generic/backport-4.19/739-v5.5-net-phylink-update-to-use-phy_support_asym_pause.patch index f4ffe85a9d..15db0abc96 100644 --- a/target/linux/generic/backport-4.19/739-v5.5-net-phylink-update-to-use-phy_support_asym_pause.patch +++ b/target/linux/generic/backport-4.19/739-v5.5-net-phylink-update-to-use-phy_support_asym_pause.patch @@ -12,7 +12,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -683,12 +683,6 @@ static int phylink_bringup_phy(struct ph +@@ -678,12 +678,6 @@ static int phylink_bringup_phy(struct ph u32 advertising; int ret; @@ -25,7 +25,7 @@ Signed-off-by: Russell King /* * This is the new way of dealing with flow control for PHYs, * as described by Timur Tabi in commit 529ed1275263 ("net: phy: -@@ -696,10 +690,13 @@ static int phylink_bringup_phy(struct ph +@@ -691,10 +685,13 @@ static int phylink_bringup_phy(struct ph * using our validate call to the MAC, we rely upon the MAC * clearing the bits from both supported and advertising fields. */ diff --git a/target/linux/generic/backport-4.19/741-v5.5-net-phylink-fix-link-mode-modification-in-PHY-mode.patch b/target/linux/generic/backport-4.19/741-v5.5-net-phylink-fix-link-mode-modification-in-PHY-mode.patch index 51162ba970..596ecc8272 100644 --- a/target/linux/generic/backport-4.19/741-v5.5-net-phylink-fix-link-mode-modification-in-PHY-mode.patch +++ b/target/linux/generic/backport-4.19/741-v5.5-net-phylink-fix-link-mode-modification-in-PHY-mode.patch @@ -25,7 +25,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1215,7 +1215,13 @@ int phylink_ethtool_ksettings_set(struct +@@ -1210,7 +1210,13 @@ int phylink_ethtool_ksettings_set(struct pl->link_config.duplex = our_kset.base.duplex; pl->link_config.an_enabled = our_kset.base.autoneg != AUTONEG_DISABLE; @@ -40,7 +40,7 @@ Signed-off-by: Russell King phylink_mac_config(pl, &pl->link_config); phylink_mac_an_restart(pl); } -@@ -1295,14 +1301,16 @@ int phylink_ethtool_set_pauseparam(struc +@@ -1290,14 +1296,16 @@ int phylink_ethtool_set_pauseparam(struc if (pause->tx_pause) config->pause |= MLO_PAUSE_TX; diff --git a/target/linux/generic/backport-4.19/745-v5.17-net-sfp-ignore-disabled-SFP-node.patch b/target/linux/generic/backport-4.19/745-v5.17-net-sfp-ignore-disabled-SFP-node.patch new file mode 100644 index 0000000000..0a7af3fa93 --- /dev/null +++ b/target/linux/generic/backport-4.19/745-v5.17-net-sfp-ignore-disabled-SFP-node.patch @@ -0,0 +1,38 @@ +From 2148927e6ed43a1667baf7c2ae3e0e05a44b51a0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Wed, 19 Jan 2022 17:44:55 +0100 +Subject: net: sfp: ignore disabled SFP node +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Commit ce0aa27ff3f6 ("sfp: add sfp-bus to bridge between network devices +and sfp cages") added code which finds SFP bus DT node even if the node +is disabled with status = "disabled". Because of this, when phylink is +created, it ends with non-null .sfp_bus member, even though the SFP +module is not probed (because the node is disabled). + +We need to ignore disabled SFP bus node. + +Fixes: ce0aa27ff3f6 ("sfp: add sfp-bus to bridge between network devices and sfp cages") +Signed-off-by: Marek BehĂșn +Cc: stable@vger.kernel.org # 2203cbf2c8b5 ("net: sfp: move fwnode parsing into sfp-bus layer") +Signed-off-by: David S. Miller +--- + drivers/net/phy/sfp-bus.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/net/phy/sfp-bus.c ++++ b/drivers/net/phy/sfp-bus.c +@@ -557,6 +557,11 @@ struct sfp_bus *sfp_bus_find_fwnode(stru + else if (ret < 0) + return ERR_PTR(ret); + ++ if (!fwnode_device_is_available(ref.fwnode)) { ++ fwnode_handle_put(ref.fwnode); ++ return NULL; ++ } ++ + bus = sfp_bus_get(ref.fwnode); + fwnode_handle_put(ref.fwnode); + if (!bus) diff --git a/target/linux/generic/pending-4.19/741-net-sfp-derive-interface-mode-from-ethtool-link-mode.patch b/target/linux/generic/pending-4.19/741-net-sfp-derive-interface-mode-from-ethtool-link-mode.patch index e0dbabc776..f20b66eae7 100644 --- a/target/linux/generic/pending-4.19/741-net-sfp-derive-interface-mode-from-ethtool-link-mode.patch +++ b/target/linux/generic/pending-4.19/741-net-sfp-derive-interface-mode-from-ethtool-link-mode.patch @@ -29,7 +29,7 @@ Signed-off-by: Russell King dev_err(&phydev->mdio.dev, "incompatible SFP module inserted\n"); --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1668,7 +1668,7 @@ static int phylink_sfp_module_insert(voi +@@ -1663,7 +1663,7 @@ static int phylink_sfp_module_insert(voi linkmode_copy(support1, support); diff --git a/target/linux/generic/pending-4.19/743-net-sfp-add-module-start-stop-upstream-notifications.patch b/target/linux/generic/pending-4.19/743-net-sfp-add-module-start-stop-upstream-notifications.patch index c0c3e9e57e..9b3ebe6a4a 100644 --- a/target/linux/generic/pending-4.19/743-net-sfp-add-module-start-stop-upstream-notifications.patch +++ b/target/linux/generic/pending-4.19/743-net-sfp-add-module-start-stop-upstream-notifications.patch @@ -32,7 +32,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/sfp-bus.c +++ b/drivers/net/phy/sfp-bus.c -@@ -711,6 +711,27 @@ void sfp_module_remove(struct sfp_bus *b +@@ -716,6 +716,27 @@ void sfp_module_remove(struct sfp_bus *b } EXPORT_SYMBOL_GPL(sfp_module_remove); diff --git a/target/linux/generic/pending-4.19/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch b/target/linux/generic/pending-4.19/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch index 1068873085..a646fcd409 100644 --- a/target/linux/generic/pending-4.19/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch +++ b/target/linux/generic/pending-4.19/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch @@ -16,7 +16,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1722,6 +1722,26 @@ static int phylink_sfp_module_insert(voi +@@ -1717,6 +1717,26 @@ static int phylink_sfp_module_insert(voi return ret; } @@ -43,7 +43,7 @@ Signed-off-by: Russell King static void phylink_sfp_link_down(void *upstream) { struct phylink *pl = upstream; -@@ -1757,6 +1777,8 @@ static const struct sfp_upstream_ops sfp +@@ -1752,6 +1772,8 @@ static const struct sfp_upstream_ops sfp .attach = phylink_sfp_attach, .detach = phylink_sfp_detach, .module_insert = phylink_sfp_module_insert, diff --git a/target/linux/generic/pending-4.19/746-net-phylink-re-split-__phylink_connect_phy.patch b/target/linux/generic/pending-4.19/746-net-phylink-re-split-__phylink_connect_phy.patch index fbe0fc176d..c74a56c575 100644 --- a/target/linux/generic/pending-4.19/746-net-phylink-re-split-__phylink_connect_phy.patch +++ b/target/linux/generic/pending-4.19/746-net-phylink-re-split-__phylink_connect_phy.patch @@ -16,7 +16,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -733,11 +733,9 @@ static int phylink_bringup_phy(struct ph +@@ -728,11 +728,9 @@ static int phylink_bringup_phy(struct ph return 0; } @@ -30,7 +30,7 @@ Signed-off-by: Russell King if (WARN_ON(pl->link_an_mode == MLO_AN_FIXED || (pl->link_an_mode == MLO_AN_INBAND && phy_interface_mode_is_8023z(interface)))) -@@ -746,15 +744,7 @@ static int __phylink_connect_phy(struct +@@ -741,15 +739,7 @@ static int __phylink_connect_phy(struct if (pl->phydev) return -EBUSY; @@ -47,7 +47,7 @@ Signed-off-by: Russell King } /** -@@ -774,13 +764,23 @@ static int __phylink_connect_phy(struct +@@ -769,13 +759,23 @@ static int __phylink_connect_phy(struct */ int phylink_connect_phy(struct phylink *pl, struct phy_device *phy) { @@ -72,7 +72,7 @@ Signed-off-by: Russell King } EXPORT_SYMBOL_GPL(phylink_connect_phy); -@@ -1764,8 +1764,17 @@ static void phylink_sfp_link_up(void *up +@@ -1759,8 +1759,17 @@ static void phylink_sfp_link_up(void *up static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy) { struct phylink *pl = upstream; diff --git a/target/linux/generic/pending-4.19/747-net-phylink-support-Clause-45-PHYs-on-SFP-modules.patch b/target/linux/generic/pending-4.19/747-net-phylink-support-Clause-45-PHYs-on-SFP-modules.patch index 70b07fbd51..2cea118c82 100644 --- a/target/linux/generic/pending-4.19/747-net-phylink-support-Clause-45-PHYs-on-SFP-modules.patch +++ b/target/linux/generic/pending-4.19/747-net-phylink-support-Clause-45-PHYs-on-SFP-modules.patch @@ -18,7 +18,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -676,7 +676,8 @@ static void phylink_phy_change(struct ph +@@ -671,7 +671,8 @@ static void phylink_phy_change(struct ph phy_duplex_to_str(phydev->duplex)); } @@ -28,7 +28,7 @@ Signed-off-by: Russell King { struct phylink_link_state config; __ETHTOOL_DECLARE_LINK_MODE_MASK(supported); -@@ -696,7 +697,7 @@ static int phylink_bringup_phy(struct ph +@@ -691,7 +692,7 @@ static int phylink_bringup_phy(struct ph ethtool_convert_legacy_u32_to_link_mode(supported, phy->supported); ethtool_convert_legacy_u32_to_link_mode(config.advertising, phy->advertising); @@ -37,7 +37,7 @@ Signed-off-by: Russell King ret = phylink_validate(pl, supported, &config); if (ret) -@@ -712,6 +713,7 @@ static int phylink_bringup_phy(struct ph +@@ -707,6 +708,7 @@ static int phylink_bringup_phy(struct ph mutex_lock(&phy->lock); mutex_lock(&pl->state_mutex); pl->phydev = phy; @@ -45,7 +45,7 @@ Signed-off-by: Russell King linkmode_copy(pl->supported, supported); linkmode_copy(pl->link_config.advertising, config.advertising); -@@ -776,7 +778,7 @@ int phylink_connect_phy(struct phylink * +@@ -771,7 +773,7 @@ int phylink_connect_phy(struct phylink * if (ret < 0) return ret; @@ -54,7 +54,7 @@ Signed-off-by: Russell King if (ret) phy_detach(phy); -@@ -829,7 +831,7 @@ int phylink_of_phy_connect(struct phylin +@@ -824,7 +826,7 @@ int phylink_of_phy_connect(struct phylin if (!phy_dev) return -ENODEV; @@ -63,7 +63,7 @@ Signed-off-by: Russell King if (ret) phy_detach(phy_dev); -@@ -1764,13 +1766,22 @@ static void phylink_sfp_link_up(void *up +@@ -1759,13 +1761,22 @@ static void phylink_sfp_link_up(void *up static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy) { struct phylink *pl = upstream; diff --git a/target/linux/generic/pending-4.19/748-net-phylink-split-link_an_mode-configured-and-curren.patch b/target/linux/generic/pending-4.19/748-net-phylink-split-link_an_mode-configured-and-curren.patch index 00350be24e..f30d37f0c6 100644 --- a/target/linux/generic/pending-4.19/748-net-phylink-split-link_an_mode-configured-and-curren.patch +++ b/target/linux/generic/pending-4.19/748-net-phylink-split-link_an_mode-configured-and-curren.patch @@ -91,7 +91,7 @@ Signed-off-by: Russell King pl->cur_interface, pl->phydev); netif_carrier_on(ndev); -@@ -615,7 +616,7 @@ struct phylink *phylink_create(struct ne +@@ -610,7 +611,7 @@ struct phylink *phylink_create(struct ne return ERR_PTR(ret); } @@ -100,7 +100,7 @@ Signed-off-by: Russell King ret = phylink_parse_fixedlink(pl, fwnode); if (ret < 0) { kfree(pl); -@@ -623,6 +624,8 @@ struct phylink *phylink_create(struct ne +@@ -618,6 +619,8 @@ struct phylink *phylink_create(struct ne } } @@ -109,7 +109,7 @@ Signed-off-by: Russell King ret = phylink_register_sfp(pl, fwnode); if (ret < 0) { kfree(pl); -@@ -738,8 +741,8 @@ static int phylink_bringup_phy(struct ph +@@ -733,8 +736,8 @@ static int phylink_bringup_phy(struct ph static int phylink_attach_phy(struct phylink *pl, struct phy_device *phy, phy_interface_t interface) { @@ -120,7 +120,7 @@ Signed-off-by: Russell King phy_interface_mode_is_8023z(interface)))) return -EINVAL; -@@ -806,8 +809,8 @@ int phylink_of_phy_connect(struct phylin +@@ -801,8 +804,8 @@ int phylink_of_phy_connect(struct phylin int ret; /* Fixed links and 802.3z are handled without needing a PHY */ @@ -131,7 +131,7 @@ Signed-off-by: Russell King phy_interface_mode_is_8023z(pl->link_interface))) return 0; -@@ -818,7 +821,7 @@ int phylink_of_phy_connect(struct phylin +@@ -813,7 +816,7 @@ int phylink_of_phy_connect(struct phylin phy_node = of_parse_phandle(dn, "phy-device", 0); if (!phy_node) { @@ -140,7 +140,7 @@ Signed-off-by: Russell King return -ENODEV; return 0; } -@@ -881,7 +884,7 @@ int phylink_fixed_state_cb(struct phylin +@@ -876,7 +879,7 @@ int phylink_fixed_state_cb(struct phylin /* It does not make sense to let the link be overriden unless we use * MLO_AN_FIXED */ @@ -149,7 +149,7 @@ Signed-off-by: Russell King return -EINVAL; mutex_lock(&pl->state_mutex); -@@ -931,7 +934,7 @@ void phylink_start(struct phylink *pl) +@@ -926,7 +929,7 @@ void phylink_start(struct phylink *pl) ASSERT_RTNL(); netdev_info(pl->netdev, "configuring for %s/%s link mode\n", @@ -158,7 +158,7 @@ Signed-off-by: Russell King phy_modes(pl->link_config.interface)); /* Always set the carrier off */ -@@ -953,7 +956,7 @@ void phylink_start(struct phylink *pl) +@@ -948,7 +951,7 @@ void phylink_start(struct phylink *pl) clear_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state); phylink_run_resolve(pl); @@ -167,7 +167,7 @@ Signed-off-by: Russell King int irq = gpiod_to_irq(pl->link_gpio); if (irq > 0) { -@@ -968,7 +971,7 @@ void phylink_start(struct phylink *pl) +@@ -963,7 +966,7 @@ void phylink_start(struct phylink *pl) if (irq <= 0) mod_timer(&pl->link_poll, jiffies + HZ); } @@ -176,7 +176,7 @@ Signed-off-by: Russell King mod_timer(&pl->link_poll, jiffies + HZ); if (pl->phydev) phy_start(pl->phydev); -@@ -1095,7 +1098,7 @@ int phylink_ethtool_ksettings_get(struct +@@ -1090,7 +1093,7 @@ int phylink_ethtool_ksettings_get(struct linkmode_copy(kset->link_modes.supported, pl->supported); @@ -185,7 +185,7 @@ Signed-off-by: Russell King case MLO_AN_FIXED: /* We are using fixed settings. Report these as the * current link settings - and note that these also -@@ -1168,7 +1171,7 @@ int phylink_ethtool_ksettings_set(struct +@@ -1163,7 +1166,7 @@ int phylink_ethtool_ksettings_set(struct /* If we have a fixed link (as specified by firmware), refuse * to change link parameters. */ @@ -194,7 +194,7 @@ Signed-off-by: Russell King (s->speed != pl->link_config.speed || s->duplex != pl->link_config.duplex)) return -EINVAL; -@@ -1180,7 +1183,7 @@ int phylink_ethtool_ksettings_set(struct +@@ -1175,7 +1178,7 @@ int phylink_ethtool_ksettings_set(struct __clear_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, config.advertising); } else { /* If we have a fixed link, refuse to enable autonegotiation */ @@ -203,7 +203,7 @@ Signed-off-by: Russell King return -EINVAL; config.speed = SPEED_UNKNOWN; -@@ -1222,7 +1225,7 @@ int phylink_ethtool_ksettings_set(struct +@@ -1217,7 +1220,7 @@ int phylink_ethtool_ksettings_set(struct * configuration. For a fixed link, this isn't able to change any * parameters, which just leaves inband mode. */ @@ -212,7 +212,7 @@ Signed-off-by: Russell King !test_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state)) { phylink_mac_config(pl, &pl->link_config); phylink_mac_an_restart(pl); -@@ -1312,7 +1315,7 @@ int phylink_ethtool_set_pauseparam(struc +@@ -1307,7 +1310,7 @@ int phylink_ethtool_set_pauseparam(struc pause->tx_pause); } else if (!test_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state)) { @@ -221,7 +221,7 @@ Signed-off-by: Russell King case MLO_AN_FIXED: /* Should we allow fixed links to change against the config? */ phylink_resolve_flow(pl, config); -@@ -1501,7 +1504,7 @@ static int phylink_mii_read(struct phyli +@@ -1496,7 +1499,7 @@ static int phylink_mii_read(struct phyli struct phylink_link_state state; int val = 0xffff; @@ -230,7 +230,7 @@ Signed-off-by: Russell King case MLO_AN_FIXED: if (phy_id == 0) { phylink_get_fixed_state(pl, &state); -@@ -1529,7 +1532,7 @@ static int phylink_mii_read(struct phyli +@@ -1524,7 +1527,7 @@ static int phylink_mii_read(struct phyli static int phylink_mii_write(struct phylink *pl, unsigned int phy_id, unsigned int reg, unsigned int val) { @@ -239,7 +239,7 @@ Signed-off-by: Russell King case MLO_AN_FIXED: break; -@@ -1703,10 +1706,10 @@ static int phylink_sfp_module_insert(voi +@@ -1698,10 +1701,10 @@ static int phylink_sfp_module_insert(voi linkmode_copy(pl->link_config.advertising, config.advertising); } diff --git a/target/linux/generic/pending-4.19/749-net-phylink-split-phylink_sfp_module_insert.patch b/target/linux/generic/pending-4.19/749-net-phylink-split-phylink_sfp_module_insert.patch index 7a5283a59c..87d70d1434 100644 --- a/target/linux/generic/pending-4.19/749-net-phylink-split-phylink_sfp_module_insert.patch +++ b/target/linux/generic/pending-4.19/749-net-phylink-split-phylink_sfp_module_insert.patch @@ -13,7 +13,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1638,25 +1638,21 @@ static void phylink_sfp_detach(void *ups +@@ -1633,25 +1633,21 @@ static void phylink_sfp_detach(void *ups pl->netdev->sfp_bus = NULL; } @@ -46,7 +46,7 @@ Signed-off-by: Russell King config.interface = PHY_INTERFACE_MODE_NA; config.speed = SPEED_UNKNOWN; config.duplex = DUPLEX_UNKNOWN; -@@ -1671,8 +1667,6 @@ static int phylink_sfp_module_insert(voi +@@ -1666,8 +1662,6 @@ static int phylink_sfp_module_insert(voi return ret; } @@ -55,7 +55,7 @@ Signed-off-by: Russell King iface = sfp_select_interface(pl->sfp_bus, config.advertising); if (iface == PHY_INTERFACE_MODE_NA) { netdev_err(pl->netdev, -@@ -1682,18 +1676,18 @@ static int phylink_sfp_module_insert(voi +@@ -1677,18 +1671,18 @@ static int phylink_sfp_module_insert(voi } config.interface = iface; @@ -77,7 +77,7 @@ Signed-off-by: Russell King __ETHTOOL_LINK_MODE_MASK_NBITS, support); if (phy_interface_mode_is_8023z(iface) && pl->phydev) -@@ -1706,15 +1700,15 @@ static int phylink_sfp_module_insert(voi +@@ -1701,15 +1695,15 @@ static int phylink_sfp_module_insert(voi linkmode_copy(pl->link_config.advertising, config.advertising); } @@ -96,7 +96,7 @@ Signed-off-by: Russell King phy_modes(config.interface)); } -@@ -1727,6 +1721,21 @@ static int phylink_sfp_module_insert(voi +@@ -1722,6 +1716,21 @@ static int phylink_sfp_module_insert(voi return ret; } diff --git a/target/linux/generic/pending-4.19/750-net-phylink-delay-MAC-configuration-for-copper-SFP-m.patch b/target/linux/generic/pending-4.19/750-net-phylink-delay-MAC-configuration-for-copper-SFP-m.patch index f5618042c9..358b9a1082 100644 --- a/target/linux/generic/pending-4.19/750-net-phylink-delay-MAC-configuration-for-copper-SFP-m.patch +++ b/target/linux/generic/pending-4.19/750-net-phylink-delay-MAC-configuration-for-copper-SFP-m.patch @@ -36,7 +36,7 @@ Signed-off-by: Russell King }; static inline void linkmode_zero(unsigned long *dst) -@@ -1638,7 +1641,7 @@ static void phylink_sfp_detach(void *ups +@@ -1633,7 +1636,7 @@ static void phylink_sfp_detach(void *ups pl->netdev->sfp_bus = NULL; } @@ -45,7 +45,7 @@ Signed-off-by: Russell King const unsigned long *supported, const unsigned long *advertising) { -@@ -1712,7 +1715,7 @@ static int phylink_sfp_config(struct phy +@@ -1707,7 +1710,7 @@ static int phylink_sfp_config(struct phy phy_modes(config.interface)); } @@ -54,7 +54,7 @@ Signed-off-by: Russell King if (changed && !test_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state)) -@@ -1725,15 +1728,20 @@ static int phylink_sfp_module_insert(voi +@@ -1720,15 +1723,20 @@ static int phylink_sfp_module_insert(voi const struct sfp_eeprom_id *id) { struct phylink *pl = upstream; @@ -79,7 +79,7 @@ Signed-off-by: Russell King } static int phylink_sfp_module_start(void *upstream) -@@ -1741,10 +1749,19 @@ static int phylink_sfp_module_start(void +@@ -1736,10 +1744,19 @@ static int phylink_sfp_module_start(void struct phylink *pl = upstream; /* If this SFP module has a PHY, start the PHY now. */ @@ -102,7 +102,7 @@ Signed-off-by: Russell King } static void phylink_sfp_module_stop(void *upstream) -@@ -1778,10 +1795,30 @@ static void phylink_sfp_link_up(void *up +@@ -1773,10 +1790,30 @@ static void phylink_sfp_link_up(void *up static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy) { struct phylink *pl = upstream; diff --git a/target/linux/generic/pending-4.19/751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch b/target/linux/generic/pending-4.19/751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch index c011f3cf8c..1724d445b7 100644 --- a/target/linux/generic/pending-4.19/751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch +++ b/target/linux/generic/pending-4.19/751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch @@ -18,7 +18,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1792,12 +1792,22 @@ static void phylink_sfp_link_up(void *up +@@ -1787,12 +1787,22 @@ static void phylink_sfp_link_up(void *up phylink_run_resolve(pl); } @@ -41,7 +41,7 @@ Signed-off-by: Russell King int ret; /* -@@ -1812,8 +1822,13 @@ static int phylink_sfp_connect_phy(void +@@ -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);