diff --git a/target/linux/generic/backport-6.12/704-v7.3-net-phylink-treat-PSGMII-as-an-inband-capable-interface.patch b/target/linux/generic/backport-6.12/704-v7.3-net-phylink-treat-PSGMII-as-an-inband-capable-interface.patch new file mode 100644 index 00000000000..97e49e9a2ba --- /dev/null +++ b/target/linux/generic/backport-6.12/704-v7.3-net-phylink-treat-PSGMII-as-an-inband-capable-interface.patch @@ -0,0 +1,71 @@ +From 5ba017f9efef3cf65cc60005aae4cbbf70b9b2b8 Mon Sep 17 00:00:00 2001 +From: Sandeep Sondagar +Date: Sun, 9 Aug 2026 21:31:41 +0530 +Subject: [PATCH] net: phylink: treat PSGMII as an inband capable interface + +PSGMII (the Qualcomm 5-port SGMII) conveys the link negotiation result +from the PHY back to the MAC through per-channel in-band SGMII words, +exactly like SGMII and QSGMII. + +However, PHY_INTERFACE_MODE_PSGMII is missing from +phylink_get_inband_type(), so phylink reports INBAND_NONE for it and +phylink_pcs_neg_mode() falls back to PHYLINK_PCS_NEG_NONE. The PCS is +then programmed in force mode and its control-register speed bits (which +default to 1000base) are used, so a slower copper link - e.g. 100base-T +- is reported as 1Gbps and cannot pass traffic. + +Classify PSGMII alongside SGMII and QSGMII as INBAND_CISCO_SGMII so the +PCS negotiates in-band and the resolved link speed comes from the PHY +in-band word. + +Also add PSGMII to the generic clause 22 PCS helper functions which +handle the SGMII in-band word. Without this, a PCS using these helpers +would still fall through to the default handling and force the link +state to false in phylink_mii_c22_pcs_decode_state(), fail to encode +the SGMII advertisement, and get rejected by phylink_get_link_timer_ns(). + +Signed-off-by: Sandeep Sondagar +Reviewed-by: Nicolai Buchwitz +Link: https://patch.msgid.link/20260809-phylink-psgmii-v3-1-908dcd3a9e3d@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/phy/phylink.c | 3 +++ + include/linux/phylink.h | 1 + + 2 files changed, 4 insertions(+) + +--- a/drivers/net/phy/phylink.c ++++ b/drivers/net/phy/phylink.c +@@ -1171,6 +1171,7 @@ static enum inband_type phylink_get_inba + { + switch (interface) { + case PHY_INTERFACE_MODE_SGMII: ++ case PHY_INTERFACE_MODE_PSGMII: + case PHY_INTERFACE_MODE_QSGMII: + case PHY_INTERFACE_MODE_QUSGMII: + case PHY_INTERFACE_MODE_USXGMII: +@@ -3956,6 +3957,7 @@ void phylink_mii_c22_pcs_decode_state(st + break; + + case PHY_INTERFACE_MODE_SGMII: ++ case PHY_INTERFACE_MODE_PSGMII: + case PHY_INTERFACE_MODE_QSGMII: + phylink_decode_sgmii_word(state, lpa); + break; +@@ -4031,6 +4033,7 @@ int phylink_mii_c22_pcs_encode_advertise + adv |= ADVERTISE_1000XPSE_ASYM; + return adv; + case PHY_INTERFACE_MODE_SGMII: ++ case PHY_INTERFACE_MODE_PSGMII: + case PHY_INTERFACE_MODE_QSGMII: + return 0x0001; + default: +--- a/include/linux/phylink.h ++++ b/include/linux/phylink.h +@@ -674,6 +674,7 @@ static inline int phylink_get_link_timer + { + switch (interface) { + case PHY_INTERFACE_MODE_SGMII: ++ case PHY_INTERFACE_MODE_PSGMII: + case PHY_INTERFACE_MODE_QSGMII: + case PHY_INTERFACE_MODE_USXGMII: + case PHY_INTERFACE_MODE_10G_QXGMII: diff --git a/target/linux/generic/backport-6.18/704-v7.3-net-phylink-treat-PSGMII-as-an-inband-capable-interface.patch b/target/linux/generic/backport-6.18/704-v7.3-net-phylink-treat-PSGMII-as-an-inband-capable-interface.patch new file mode 100644 index 00000000000..1d17137a949 --- /dev/null +++ b/target/linux/generic/backport-6.18/704-v7.3-net-phylink-treat-PSGMII-as-an-inband-capable-interface.patch @@ -0,0 +1,71 @@ +From 5ba017f9efef3cf65cc60005aae4cbbf70b9b2b8 Mon Sep 17 00:00:00 2001 +From: Sandeep Sondagar +Date: Sun, 9 Aug 2026 21:31:41 +0530 +Subject: [PATCH] net: phylink: treat PSGMII as an inband capable interface + +PSGMII (the Qualcomm 5-port SGMII) conveys the link negotiation result +from the PHY back to the MAC through per-channel in-band SGMII words, +exactly like SGMII and QSGMII. + +However, PHY_INTERFACE_MODE_PSGMII is missing from +phylink_get_inband_type(), so phylink reports INBAND_NONE for it and +phylink_pcs_neg_mode() falls back to PHYLINK_PCS_NEG_NONE. The PCS is +then programmed in force mode and its control-register speed bits (which +default to 1000base) are used, so a slower copper link - e.g. 100base-T +- is reported as 1Gbps and cannot pass traffic. + +Classify PSGMII alongside SGMII and QSGMII as INBAND_CISCO_SGMII so the +PCS negotiates in-band and the resolved link speed comes from the PHY +in-band word. + +Also add PSGMII to the generic clause 22 PCS helper functions which +handle the SGMII in-band word. Without this, a PCS using these helpers +would still fall through to the default handling and force the link +state to false in phylink_mii_c22_pcs_decode_state(), fail to encode +the SGMII advertisement, and get rejected by phylink_get_link_timer_ns(). + +Signed-off-by: Sandeep Sondagar +Reviewed-by: Nicolai Buchwitz +Link: https://patch.msgid.link/20260809-phylink-psgmii-v3-1-908dcd3a9e3d@gmail.com +Signed-off-by: Jakub Kicinski +--- + drivers/net/phy/phylink.c | 3 +++ + include/linux/phylink.h | 1 + + 2 files changed, 4 insertions(+) + +--- a/drivers/net/phy/phylink.c ++++ b/drivers/net/phy/phylink.c +@@ -1036,6 +1036,7 @@ static enum inband_type phylink_get_inba + { + switch (interface) { + case PHY_INTERFACE_MODE_SGMII: ++ case PHY_INTERFACE_MODE_PSGMII: + case PHY_INTERFACE_MODE_QSGMII: + case PHY_INTERFACE_MODE_QUSGMII: + case PHY_INTERFACE_MODE_USXGMII: +@@ -4093,6 +4094,7 @@ void phylink_mii_c22_pcs_decode_state(st + break; + + case PHY_INTERFACE_MODE_SGMII: ++ case PHY_INTERFACE_MODE_PSGMII: + case PHY_INTERFACE_MODE_QSGMII: + if (neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED) + phylink_decode_sgmii_word(state, lpa); +@@ -4173,6 +4175,7 @@ int phylink_mii_c22_pcs_encode_advertise + adv |= ADVERTISE_1000XPSE_ASYM; + return adv; + case PHY_INTERFACE_MODE_SGMII: ++ case PHY_INTERFACE_MODE_PSGMII: + case PHY_INTERFACE_MODE_QSGMII: + return 0x0001; + default: +--- a/include/linux/phylink.h ++++ b/include/linux/phylink.h +@@ -762,6 +762,7 @@ static inline int phylink_get_link_timer + { + switch (interface) { + case PHY_INTERFACE_MODE_SGMII: ++ case PHY_INTERFACE_MODE_PSGMII: + case PHY_INTERFACE_MODE_QSGMII: + case PHY_INTERFACE_MODE_USXGMII: + case PHY_INTERFACE_MODE_10G_QXGMII: diff --git a/target/linux/generic/pending-6.12/706-net-phy-populate-host_interfaces-when-attaching-PHY.patch b/target/linux/generic/pending-6.12/706-net-phy-populate-host_interfaces-when-attaching-PHY.patch index 067914f866a..71417c3e46a 100644 --- a/target/linux/generic/pending-6.12/706-net-phy-populate-host_interfaces-when-attaching-PHY.patch +++ b/target/linux/generic/pending-6.12/706-net-phy-populate-host_interfaces-when-attaching-PHY.patch @@ -20,7 +20,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -2314,7 +2314,7 @@ int phylink_fwnode_phy_connect(struct ph +@@ -2315,7 +2315,7 @@ int phylink_fwnode_phy_connect(struct ph { struct fwnode_handle *phy_fwnode; struct phy_device *phy_dev; @@ -29,7 +29,7 @@ Signed-off-by: Daniel Golle /* Fixed links and 802.3z are handled without needing a PHY */ if (pl->cfg_link_an_mode == MLO_AN_FIXED || -@@ -2344,6 +2344,25 @@ int phylink_fwnode_phy_connect(struct ph +@@ -2345,6 +2345,25 @@ int phylink_fwnode_phy_connect(struct ph if (pl->config->mac_requires_rxc) flags |= PHY_F_RXC_ALWAYS_ON; diff --git a/target/linux/generic/pending-6.12/770-01-net-phylink-keep-and-use-MAC-supported_interfaces-in.patch b/target/linux/generic/pending-6.12/770-01-net-phylink-keep-and-use-MAC-supported_interfaces-in.patch index 92e063385e6..fe667cd51a5 100644 --- a/target/linux/generic/pending-6.12/770-01-net-phylink-keep-and-use-MAC-supported_interfaces-in.patch +++ b/target/linux/generic/pending-6.12/770-01-net-phylink-keep-and-use-MAC-supported_interfaces-in.patch @@ -41,7 +41,7 @@ Signed-off-by: Christian Marangi if (state->interface == PHY_INTERFACE_MODE_NA) return phylink_validate_mask(pl, NULL, supported, state, -@@ -1948,6 +1953,9 @@ struct phylink *phylink_create(struct ph +@@ -1949,6 +1954,9 @@ struct phylink *phylink_create(struct ph mutex_init(&pl->state_mutex); INIT_WORK(&pl->resolve, phylink_resolve); @@ -51,7 +51,7 @@ Signed-off-by: Christian Marangi pl->config = config; if (config->type == PHYLINK_NETDEV) { pl->netdev = to_net_dev(config->dev); -@@ -2092,7 +2100,7 @@ static int phylink_validate_phy(struct p +@@ -2093,7 +2101,7 @@ static int phylink_validate_phy(struct p * those which the host supports. */ phy_interface_and(interfaces, phy->possible_interfaces, @@ -60,7 +60,7 @@ Signed-off-by: Christian Marangi if (phy_interface_empty(interfaces)) { phylink_err(pl, "PHY has no common interfaces\n"); -@@ -3566,14 +3574,14 @@ static int phylink_sfp_config_optical(st +@@ -3567,14 +3575,14 @@ static int phylink_sfp_config_optical(st phylink_dbg(pl, "optical SFP: interfaces=[mac=%*pbl, sfp=%*pbl]\n", (int)PHY_INTERFACE_MODE_MAX, @@ -77,7 +77,7 @@ Signed-off-by: Christian Marangi pl->sfp_interfaces); if (phy_interface_empty(interfaces)) { phylink_err(pl, "unsupported SFP module: no common interface modes\n"); -@@ -3731,7 +3739,7 @@ static int phylink_sfp_connect_phy(void +@@ -3732,7 +3740,7 @@ static int phylink_sfp_connect_phy(void /* Set the PHY's host supported interfaces */ phy_interface_and(phy->host_interfaces, phylink_sfp_interfaces, diff --git a/target/linux/generic/pending-6.12/770-02-net-phylink-introduce-internal-phylink-PCS-handling.patch b/target/linux/generic/pending-6.12/770-02-net-phylink-introduce-internal-phylink-PCS-handling.patch index 622be40d1cb..6d3d260b2db 100644 --- a/target/linux/generic/pending-6.12/770-02-net-phylink-introduce-internal-phylink-PCS-handling.patch +++ b/target/linux/generic/pending-6.12/770-02-net-phylink-introduce-internal-phylink-PCS-handling.patch @@ -189,7 +189,7 @@ Signed-off-by: Christian Marangi return 0; return phylink_pcs_inband_caps(pcs, interface); -@@ -1397,10 +1444,36 @@ static void phylink_major_config(struct +@@ -1398,10 +1445,36 @@ static void phylink_major_config(struct pl->major_config_failed = true; return; } @@ -227,7 +227,7 @@ Signed-off-by: Christian Marangi phylink_pcs_neg_mode(pl, pcs, state->interface, state->advertising); phylink_dbg(pl, "major config, active %s/%s/%s\n", -@@ -1427,11 +1500,13 @@ static void phylink_major_config(struct +@@ -1428,11 +1501,13 @@ static void phylink_major_config(struct if (pcs_changed) { phylink_pcs_disable(pl->pcs); @@ -245,7 +245,7 @@ Signed-off-by: Christian Marangi pl->pcs = pcs; } -@@ -1909,6 +1984,44 @@ int phylink_set_fixed_link(struct phylin +@@ -1910,6 +1985,44 @@ int phylink_set_fixed_link(struct phylin } EXPORT_SYMBOL_GPL(phylink_set_fixed_link); @@ -290,7 +290,7 @@ Signed-off-by: Christian Marangi /** * phylink_create() - create a phylink instance * @config: a pointer to the target &struct phylink_config -@@ -1931,6 +2044,7 @@ struct phylink *phylink_create(struct ph +@@ -1932,6 +2045,7 @@ struct phylink *phylink_create(struct ph const struct phylink_mac_ops *mac_ops) { bool using_mac_select_pcs = false; @@ -298,7 +298,7 @@ Signed-off-by: Christian Marangi struct phylink *pl; int ret; -@@ -1952,9 +2066,21 @@ struct phylink *phylink_create(struct ph +@@ -1953,9 +2067,21 @@ struct phylink *phylink_create(struct ph mutex_init(&pl->state_mutex); INIT_WORK(&pl->resolve, phylink_resolve); @@ -320,7 +320,7 @@ Signed-off-by: Christian Marangi pl->config = config; if (config->type == PHYLINK_NETDEV) { -@@ -2025,10 +2151,16 @@ EXPORT_SYMBOL_GPL(phylink_create); +@@ -2026,10 +2152,16 @@ EXPORT_SYMBOL_GPL(phylink_create); */ void phylink_destroy(struct phylink *pl) { @@ -337,7 +337,7 @@ Signed-off-by: Christian Marangi cancel_work_sync(&pl->resolve); kfree(pl); } -@@ -2473,6 +2605,7 @@ static irqreturn_t phylink_link_handler( +@@ -2474,6 +2606,7 @@ static irqreturn_t phylink_link_handler( */ void phylink_start(struct phylink *pl) { @@ -345,7 +345,7 @@ Signed-off-by: Christian Marangi bool poll = false; ASSERT_RTNL(); -@@ -2499,6 +2632,10 @@ void phylink_start(struct phylink *pl) +@@ -2500,6 +2633,10 @@ void phylink_start(struct phylink *pl) pl->pcs_state = PCS_STATE_STARTED; @@ -356,7 +356,7 @@ Signed-off-by: Christian Marangi phylink_enable_and_run_resolve(pl, PHYLINK_DISABLE_STOPPED); if (pl->cfg_link_an_mode == MLO_AN_FIXED && pl->link_gpio) { -@@ -2543,6 +2680,8 @@ EXPORT_SYMBOL_GPL(phylink_start); +@@ -2544,6 +2681,8 @@ EXPORT_SYMBOL_GPL(phylink_start); */ void phylink_stop(struct phylink *pl) { @@ -365,7 +365,7 @@ Signed-off-by: Christian Marangi ASSERT_RTNL(); if (pl->sfp_bus) -@@ -2560,6 +2699,14 @@ void phylink_stop(struct phylink *pl) +@@ -2561,6 +2700,14 @@ void phylink_stop(struct phylink *pl) pl->pcs_state = PCS_STATE_DOWN; phylink_pcs_disable(pl->pcs); diff --git a/target/linux/generic/pending-6.12/770-03-net-phylink-add-phylink_release_pcs-to-externally-re.patch b/target/linux/generic/pending-6.12/770-03-net-phylink-add-phylink_release_pcs-to-externally-re.patch index 95969645af6..44e6ce9a2f5 100644 --- a/target/linux/generic/pending-6.12/770-03-net-phylink-add-phylink_release_pcs-to-externally-re.patch +++ b/target/linux/generic/pending-6.12/770-03-net-phylink-add-phylink_release_pcs-to-externally-re.patch @@ -93,7 +93,7 @@ Signed-off-by: Christian Marangi static unsigned int phylink_pcs_inband_caps(struct phylink_pcs *pcs, phy_interface_t interface) { -@@ -1818,6 +1868,10 @@ static void phylink_resolve(struct work_ +@@ -1819,6 +1869,10 @@ static void phylink_resolve(struct work_ if (pl->phydev) link_state.link &= pl->phy_state.link; @@ -104,7 +104,7 @@ Signed-off-by: Christian Marangi /* Only update if the PHY link is up */ if (pl->phydev && pl->phy_state.link) { /* If the interface has changed, force a link down -@@ -1852,7 +1906,7 @@ static void phylink_resolve(struct work_ +@@ -1853,7 +1907,7 @@ static void phylink_resolve(struct work_ phylink_apply_manual_flow(pl, &link_state); if ((mac_config && link_state.interface != pl->link_config.interface) || @@ -113,7 +113,7 @@ Signed-off-by: Christian Marangi /* The interface has changed or a forced major configuration * was requested, so force the link down and then reconfigure. */ -@@ -1863,6 +1917,7 @@ static void phylink_resolve(struct work_ +@@ -1864,6 +1918,7 @@ static void phylink_resolve(struct work_ phylink_major_config(pl, false, &link_state); pl->link_config.interface = link_state.interface; pl->force_major_config = false; diff --git a/target/linux/generic/pending-6.12/770-05-net-phylink-support-late-PCS-provider-attach.patch b/target/linux/generic/pending-6.12/770-05-net-phylink-support-late-PCS-provider-attach.patch index 2af52463b8b..c70e23e6520 100644 --- a/target/linux/generic/pending-6.12/770-05-net-phylink-support-late-PCS-provider-attach.patch +++ b/target/linux/generic/pending-6.12/770-05-net-phylink-support-late-PCS-provider-attach.patch @@ -110,7 +110,7 @@ Signed-off-by: Christian Marangi /* What interface are supported by the current link. * Can change on removal or addition of new PCS. -@@ -2077,6 +2079,51 @@ out: +@@ -2078,6 +2080,51 @@ out: return ret; } @@ -162,7 +162,7 @@ Signed-off-by: Christian Marangi /** * phylink_create() - create a phylink instance * @config: a pointer to the target &struct phylink_config -@@ -2137,6 +2184,11 @@ struct phylink *phylink_create(struct ph +@@ -2138,6 +2185,11 @@ struct phylink *phylink_create(struct ph pl->supported_interfaces, pcs->supported_interfaces); diff --git a/target/linux/generic/pending-6.12/770-07-net-phylink-add-.pcs_link_down-PCS-OP.patch b/target/linux/generic/pending-6.12/770-07-net-phylink-add-.pcs_link_down-PCS-OP.patch index 4ed702de8f9..bf61db39849 100644 --- a/target/linux/generic/pending-6.12/770-07-net-phylink-add-.pcs_link_down-PCS-OP.patch +++ b/target/linux/generic/pending-6.12/770-07-net-phylink-add-.pcs_link_down-PCS-OP.patch @@ -35,7 +35,7 @@ Signed-off-by: Christian Marangi /* Query inband for a specific interface mode, asking the MAC for the * PCS which will be used to handle the interface mode. */ -@@ -1817,6 +1823,8 @@ static void phylink_link_down(struct phy +@@ -1818,6 +1824,8 @@ static void phylink_link_down(struct phy if (ndev) netif_carrier_off(ndev); diff --git a/target/linux/generic/pending-6.12/770-08-net-phylink-link-the-PCS-list-before-the-initial-con.patch b/target/linux/generic/pending-6.12/770-08-net-phylink-link-the-PCS-list-before-the-initial-con.patch index 4d1f90759a2..2e34514b90f 100644 --- a/target/linux/generic/pending-6.12/770-08-net-phylink-link-the-PCS-list-before-the-initial-con.patch +++ b/target/linux/generic/pending-6.12/770-08-net-phylink-link-the-PCS-list-before-the-initial-con.patch @@ -46,7 +46,7 @@ Signed-off-by: Julius Bairaktaris --- --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -2735,6 +2735,12 @@ void phylink_start(struct phylink *pl) +@@ -2736,6 +2736,12 @@ void phylink_start(struct phylink *pl) pl->pcs_state = PCS_STATE_STARTING; @@ -59,7 +59,7 @@ Signed-off-by: Julius Bairaktaris /* Apply the link configuration to the MAC when starting. This allows * a fixed-link to start with the correct parameters, and also * ensures that we set the appropriate advertisement for Serdes links. -@@ -2747,10 +2753,6 @@ void phylink_start(struct phylink *pl) +@@ -2748,10 +2754,6 @@ void phylink_start(struct phylink *pl) pl->pcs_state = PCS_STATE_STARTED; diff --git a/target/linux/generic/pending-6.18/706-net-phy-populate-host_interfaces-when-attaching-PHY.patch b/target/linux/generic/pending-6.18/706-net-phy-populate-host_interfaces-when-attaching-PHY.patch index 814ddb1ad64..98201e4e8db 100644 --- a/target/linux/generic/pending-6.18/706-net-phy-populate-host_interfaces-when-attaching-PHY.patch +++ b/target/linux/generic/pending-6.18/706-net-phy-populate-host_interfaces-when-attaching-PHY.patch @@ -20,7 +20,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -2283,7 +2283,7 @@ int phylink_fwnode_phy_connect(struct ph +@@ -2284,7 +2284,7 @@ int phylink_fwnode_phy_connect(struct ph { struct fwnode_handle *phy_fwnode; struct phy_device *phy_dev; @@ -29,7 +29,7 @@ Signed-off-by: Daniel Golle /* Fixed links and 802.3z are handled without needing a PHY */ if (pl->cfg_link_an_mode == MLO_AN_FIXED || -@@ -2313,6 +2313,25 @@ int phylink_fwnode_phy_connect(struct ph +@@ -2314,6 +2314,25 @@ int phylink_fwnode_phy_connect(struct ph if (pl->config->mac_requires_rxc) flags |= PHY_F_RXC_ALWAYS_ON; diff --git a/target/linux/generic/pending-6.18/737-01-net-phylink-keep-and-use-MAC-supported_interfaces-in.patch b/target/linux/generic/pending-6.18/737-01-net-phylink-keep-and-use-MAC-supported_interfaces-in.patch index fb96432fe55..d281efa97ed 100644 --- a/target/linux/generic/pending-6.18/737-01-net-phylink-keep-and-use-MAC-supported_interfaces-in.patch +++ b/target/linux/generic/pending-6.18/737-01-net-phylink-keep-and-use-MAC-supported_interfaces-in.patch @@ -41,7 +41,7 @@ Signed-off-by: Christian Marangi if (state->interface == PHY_INTERFACE_MODE_NA) return phylink_validate_mask(pl, NULL, supported, state, -@@ -1857,6 +1862,9 @@ struct phylink *phylink_create(struct ph +@@ -1858,6 +1863,9 @@ struct phylink *phylink_create(struct ph mutex_init(&pl->state_mutex); INIT_WORK(&pl->resolve, phylink_resolve); @@ -51,7 +51,7 @@ Signed-off-by: Christian Marangi pl->config = config; if (config->type == PHYLINK_NETDEV) { pl->netdev = to_net_dev(config->dev); -@@ -2016,7 +2024,7 @@ static int phylink_validate_phy(struct p +@@ -2017,7 +2025,7 @@ static int phylink_validate_phy(struct p * those which the host supports. */ phy_interface_and(interfaces, phy->possible_interfaces, @@ -60,7 +60,7 @@ Signed-off-by: Christian Marangi if (phy_interface_empty(interfaces)) { phylink_err(pl, "PHY has no common interfaces\n"); -@@ -2758,12 +2766,12 @@ static phy_interface_t phylink_sfp_selec +@@ -2759,12 +2767,12 @@ static phy_interface_t phylink_sfp_selec return interface; } @@ -75,7 +75,7 @@ Signed-off-by: Christian Marangi return PHY_INTERFACE_MODE_NA; } -@@ -3691,14 +3699,14 @@ static int phylink_sfp_config_optical(st +@@ -3692,14 +3700,14 @@ static int phylink_sfp_config_optical(st phylink_dbg(pl, "optical SFP: interfaces=[mac=%*pbl, sfp=%*pbl]\n", (int)PHY_INTERFACE_MODE_MAX, @@ -92,7 +92,7 @@ Signed-off-by: Christian Marangi pl->sfp_interfaces); if (phy_interface_empty(pl->sfp_interfaces)) { phylink_err(pl, "unsupported SFP module: no common interface modes\n"); -@@ -3869,7 +3877,7 @@ static int phylink_sfp_connect_phy(void +@@ -3870,7 +3878,7 @@ static int phylink_sfp_connect_phy(void /* Set the PHY's host supported interfaces */ phy_interface_and(phy->host_interfaces, phylink_sfp_interfaces, diff --git a/target/linux/generic/pending-6.18/737-02-net-phylink-introduce-internal-phylink-PCS-handling.patch b/target/linux/generic/pending-6.18/737-02-net-phylink-introduce-internal-phylink-PCS-handling.patch index e5dd8433261..85867ccaaf6 100644 --- a/target/linux/generic/pending-6.18/737-02-net-phylink-introduce-internal-phylink-PCS-handling.patch +++ b/target/linux/generic/pending-6.18/737-02-net-phylink-introduce-internal-phylink-PCS-handling.patch @@ -196,7 +196,7 @@ Signed-off-by: Christian Marangi return 0; return phylink_pcs_inband_caps(pcs, interface); -@@ -1261,10 +1310,36 @@ static void phylink_major_config(struct +@@ -1262,10 +1311,36 @@ static void phylink_major_config(struct pl->major_config_failed = true; return; } @@ -234,7 +234,7 @@ Signed-off-by: Christian Marangi phylink_pcs_neg_mode(pl, pcs, state->interface, state->advertising); phylink_dbg(pl, "major config, active %s/%s/%s\n", -@@ -1291,11 +1366,13 @@ static void phylink_major_config(struct +@@ -1292,11 +1367,13 @@ static void phylink_major_config(struct if (pcs_changed) { phylink_pcs_disable(pl->pcs); @@ -252,7 +252,7 @@ Signed-off-by: Christian Marangi pl->pcs = pcs; } -@@ -1823,6 +1900,44 @@ int phylink_set_fixed_link(struct phylin +@@ -1824,6 +1901,44 @@ int phylink_set_fixed_link(struct phylin } EXPORT_SYMBOL_GPL(phylink_set_fixed_link); @@ -297,7 +297,7 @@ Signed-off-by: Christian Marangi /** * phylink_create() - create a phylink instance * @config: a pointer to the target &struct phylink_config -@@ -1844,6 +1959,7 @@ struct phylink *phylink_create(struct ph +@@ -1845,6 +1960,7 @@ struct phylink *phylink_create(struct ph phy_interface_t iface, const struct phylink_mac_ops *mac_ops) { @@ -305,7 +305,7 @@ Signed-off-by: Christian Marangi struct phylink *pl; int ret; -@@ -1861,9 +1977,21 @@ struct phylink *phylink_create(struct ph +@@ -1862,9 +1978,21 @@ struct phylink *phylink_create(struct ph mutex_init(&pl->phydev_mutex); mutex_init(&pl->state_mutex); INIT_WORK(&pl->resolve, phylink_resolve); @@ -327,7 +327,7 @@ Signed-off-by: Christian Marangi pl->config = config; if (config->type == PHYLINK_NETDEV) { -@@ -1943,10 +2071,16 @@ EXPORT_SYMBOL_GPL(phylink_create); +@@ -1944,10 +2072,16 @@ EXPORT_SYMBOL_GPL(phylink_create); */ void phylink_destroy(struct phylink *pl) { @@ -344,7 +344,7 @@ Signed-off-by: Christian Marangi cancel_work_sync(&pl->resolve); kfree(pl); } -@@ -2448,6 +2582,7 @@ static irqreturn_t phylink_link_handler( +@@ -2449,6 +2583,7 @@ static irqreturn_t phylink_link_handler( */ void phylink_start(struct phylink *pl) { @@ -352,7 +352,7 @@ Signed-off-by: Christian Marangi bool poll = false; ASSERT_RTNL(); -@@ -2474,6 +2609,10 @@ void phylink_start(struct phylink *pl) +@@ -2475,6 +2610,10 @@ void phylink_start(struct phylink *pl) pl->pcs_state = PCS_STATE_STARTED; @@ -363,7 +363,7 @@ Signed-off-by: Christian Marangi phylink_enable_and_run_resolve(pl, PHYLINK_DISABLE_STOPPED); if (pl->cfg_link_an_mode == MLO_AN_FIXED && pl->link_gpio) { -@@ -2518,6 +2657,8 @@ EXPORT_SYMBOL_GPL(phylink_start); +@@ -2519,6 +2658,8 @@ EXPORT_SYMBOL_GPL(phylink_start); */ void phylink_stop(struct phylink *pl) { @@ -372,7 +372,7 @@ Signed-off-by: Christian Marangi ASSERT_RTNL(); if (pl->sfp_bus) -@@ -2535,6 +2676,14 @@ void phylink_stop(struct phylink *pl) +@@ -2536,6 +2677,14 @@ void phylink_stop(struct phylink *pl) pl->pcs_state = PCS_STATE_DOWN; phylink_pcs_disable(pl->pcs); diff --git a/target/linux/generic/pending-6.18/737-03-net-phylink-add-phylink_release_pcs-to-externally-re.patch b/target/linux/generic/pending-6.18/737-03-net-phylink-add-phylink_release_pcs-to-externally-re.patch index 5e35f5fece0..0d802816d63 100644 --- a/target/linux/generic/pending-6.18/737-03-net-phylink-add-phylink_release_pcs-to-externally-re.patch +++ b/target/linux/generic/pending-6.18/737-03-net-phylink-add-phylink_release_pcs-to-externally-re.patch @@ -93,7 +93,7 @@ Signed-off-by: Christian Marangi static unsigned int phylink_pcs_inband_caps(struct phylink_pcs *pcs, phy_interface_t interface) { -@@ -1732,6 +1782,10 @@ static void phylink_resolve(struct work_ +@@ -1733,6 +1783,10 @@ static void phylink_resolve(struct work_ if (phy) link_state.link &= pl->phy_state.link; @@ -104,7 +104,7 @@ Signed-off-by: Christian Marangi /* Only update if the PHY link is up */ if (phy && pl->phy_state.link) { /* If the interface has changed, force a link down -@@ -1766,7 +1820,7 @@ static void phylink_resolve(struct work_ +@@ -1767,7 +1821,7 @@ static void phylink_resolve(struct work_ phylink_apply_manual_flow(pl, &link_state); if ((mac_config && link_state.interface != pl->link_config.interface) || @@ -113,7 +113,7 @@ Signed-off-by: Christian Marangi /* The interface has changed or a forced major configuration * was requested, so force the link down and then reconfigure. */ -@@ -1777,6 +1831,7 @@ static void phylink_resolve(struct work_ +@@ -1778,6 +1832,7 @@ static void phylink_resolve(struct work_ phylink_major_config(pl, false, &link_state); pl->link_config.interface = link_state.interface; pl->force_major_config = false; diff --git a/target/linux/generic/pending-6.18/737-05-net-phylink-support-late-PCS-provider-attach.patch b/target/linux/generic/pending-6.18/737-05-net-phylink-support-late-PCS-provider-attach.patch index 800b8b12113..e0294426b84 100644 --- a/target/linux/generic/pending-6.18/737-05-net-phylink-support-late-PCS-provider-attach.patch +++ b/target/linux/generic/pending-6.18/737-05-net-phylink-support-late-PCS-provider-attach.patch @@ -110,7 +110,7 @@ Signed-off-by: Christian Marangi /* What interface are supported by the current link. * Can change on removal or addition of new PCS. -@@ -1993,6 +1995,51 @@ out: +@@ -1994,6 +1996,51 @@ out: return ret; } @@ -162,7 +162,7 @@ Signed-off-by: Christian Marangi /** * phylink_create() - create a phylink instance * @config: a pointer to the target &struct phylink_config -@@ -2048,6 +2095,11 @@ struct phylink *phylink_create(struct ph +@@ -2049,6 +2096,11 @@ struct phylink *phylink_create(struct ph pl->supported_interfaces, pcs->supported_interfaces); diff --git a/target/linux/generic/pending-6.18/737-07-net-phylink-add-.pcs_link_down-PCS-OP.patch b/target/linux/generic/pending-6.18/737-07-net-phylink-add-.pcs_link_down-PCS-OP.patch index 589635f731c..2ecf4517c5f 100644 --- a/target/linux/generic/pending-6.18/737-07-net-phylink-add-.pcs_link_down-PCS-OP.patch +++ b/target/linux/generic/pending-6.18/737-07-net-phylink-add-.pcs_link_down-PCS-OP.patch @@ -35,7 +35,7 @@ Signed-off-by: Christian Marangi static void phylink_pcs_disable_eee(struct phylink_pcs *pcs) { if (pcs && pcs->ops->pcs_disable_eee) -@@ -1725,6 +1731,8 @@ static void phylink_link_down(struct phy +@@ -1726,6 +1732,8 @@ static void phylink_link_down(struct phy phylink_deactivate_lpi(pl); diff --git a/target/linux/generic/pending-6.18/737-10-net-phylink-link-the-PCS-list-before-the-initial-con.patch b/target/linux/generic/pending-6.18/737-10-net-phylink-link-the-PCS-list-before-the-initial-con.patch index af68cd28677..bb3399dddae 100644 --- a/target/linux/generic/pending-6.18/737-10-net-phylink-link-the-PCS-list-before-the-initial-con.patch +++ b/target/linux/generic/pending-6.18/737-10-net-phylink-link-the-PCS-list-before-the-initial-con.patch @@ -46,7 +46,7 @@ Signed-off-by: Julius Bairaktaris --- --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -2712,6 +2712,12 @@ void phylink_start(struct phylink *pl) +@@ -2713,6 +2713,12 @@ void phylink_start(struct phylink *pl) pl->pcs_state = PCS_STATE_STARTING; @@ -59,7 +59,7 @@ Signed-off-by: Julius Bairaktaris /* Apply the link configuration to the MAC when starting. This allows * a fixed-link to start with the correct parameters, and also * ensures that we set the appropriate advertisement for Serdes links. -@@ -2724,10 +2730,6 @@ void phylink_start(struct phylink *pl) +@@ -2725,10 +2731,6 @@ void phylink_start(struct phylink *pl) pl->pcs_state = PCS_STATE_STARTED;