🎈 Sync 2026-01-21 04:02:37
All checks were successful
target_linux_generic / Update target_linux_generic (openwrt-25.12) (push) Successful in 7s

This commit is contained in:
2026-01-21 04:02:37 +00:00
parent ec6b6fa407
commit 4bdb1b10cd
3 changed files with 10 additions and 43 deletions

View File

@@ -1,33 +0,0 @@
From a003c38d9bbbacd26b2354795bddb8d25631b0b5 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 2 Jan 2025 12:41:21 +0000
Subject: net: pcs: pcs-mtk-lynxi: correctly report in-band status capabilities
Neither does the LynxI PCS support QSGMII, nor is in-band-status supported
in 2500Base-X mode. Fix the pcs_inband_caps() method accordingly.
Fixes: 520d29bdda86 ("net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://patch.msgid.link/Z3aJccb1vW14aukg@pidgin.makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/pcs/pcs-mtk-lynxi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/net/pcs/pcs-mtk-lynxi.c
+++ b/drivers/net/pcs/pcs-mtk-lynxi.c
@@ -93,11 +93,12 @@ static unsigned int mtk_pcs_lynxi_inband
{
switch (interface) {
case PHY_INTERFACE_MODE_1000BASEX:
- case PHY_INTERFACE_MODE_2500BASEX:
case PHY_INTERFACE_MODE_SGMII:
- case PHY_INTERFACE_MODE_QSGMII:
return LINK_INBAND_DISABLE | LINK_INBAND_ENABLE;
+ case PHY_INTERFACE_MODE_2500BASEX:
+ return LINK_INBAND_DISABLE;
+
default:
return 0;
}

View File

@@ -13,7 +13,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/net/pcs/pcs-mtk-lynxi.c
+++ b/drivers/net/pcs/pcs-mtk-lynxi.c
@@ -130,14 +130,23 @@ static void mtk_pcs_lynxi_get_state(stru
@@ -129,14 +129,23 @@ static void mtk_pcs_lynxi_get_state(stru
struct phylink_link_state *state)
{
struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs);
@@ -41,7 +41,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
}
static void mtk_sgmii_reset(struct mtk_pcs_lynxi *mpcs)
@@ -158,7 +167,7 @@ static int mtk_pcs_lynxi_config(struct p
@@ -157,7 +166,7 @@ static int mtk_pcs_lynxi_config(struct p
{
struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs);
bool mode_changed = false, changed;
@@ -50,7 +50,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
int advertise, link_timer;
advertise = phylink_mii_c22_pcs_encode_advertisement(interface,
@@ -181,9 +190,8 @@ static int mtk_pcs_lynxi_config(struct p
@@ -180,9 +189,8 @@ static int mtk_pcs_lynxi_config(struct p
if (neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED) {
if (interface == PHY_INTERFACE_MODE_SGMII)
sgm_mode |= SGMII_SPEED_DUPLEX_AN;

View File

@@ -79,7 +79,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
{
return container_of(pcs, struct mtk_pcs_lynxi, pcs);
@@ -118,6 +140,17 @@ static void mtk_pcs_lynxi_get_state(stru
@@ -117,6 +139,17 @@ static void mtk_pcs_lynxi_get_state(stru
FIELD_GET(SGMII_LPA, adv));
}
@@ -97,7 +97,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
static int mtk_pcs_lynxi_config(struct phylink_pcs *pcs, unsigned int neg_mode,
phy_interface_t interface,
const unsigned long *advertising,
@@ -163,6 +196,7 @@ static int mtk_pcs_lynxi_config(struct p
@@ -162,6 +195,7 @@ static int mtk_pcs_lynxi_config(struct p
SGMII_PHYA_PWD);
/* Reset SGMII PCS state */
@@ -105,7 +105,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
regmap_set_bits(mpcs->regmap, SGMSYS_RESERVED_0,
SGMII_SW_RESET);
@@ -249,10 +283,29 @@ static void mtk_pcs_lynxi_link_up(struct
@@ -248,10 +282,29 @@ static void mtk_pcs_lynxi_link_up(struct
}
}
@@ -135,7 +135,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
mpcs->interface = PHY_INTERFACE_MODE_NA;
}
@@ -263,11 +316,12 @@ static const struct phylink_pcs_ops mtk_
@@ -262,11 +315,12 @@ static const struct phylink_pcs_ops mtk_
.pcs_an_restart = mtk_pcs_lynxi_restart_an,
.pcs_link_up = mtk_pcs_lynxi_link_up,
.pcs_disable = mtk_pcs_lynxi_disable,
@@ -151,7 +151,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
{
struct mtk_pcs_lynxi *mpcs;
u32 id, ver;
@@ -275,29 +329,33 @@ struct phylink_pcs *mtk_pcs_lynxi_create
@@ -274,29 +328,33 @@ struct phylink_pcs *mtk_pcs_lynxi_create
ret = regmap_read(regmap, SGMSYS_PCS_DEVICE_ID, &id);
if (ret < 0)
@@ -192,7 +192,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
mpcs->ana_rgc3 = ana_rgc3;
mpcs->regmap = regmap;
@@ -308,6 +366,13 @@ struct phylink_pcs *mtk_pcs_lynxi_create
@@ -307,6 +365,13 @@ struct phylink_pcs *mtk_pcs_lynxi_create
mpcs->interface = PHY_INTERFACE_MODE_NA;
return &mpcs->pcs;
@@ -206,7 +206,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
}
EXPORT_SYMBOL(mtk_pcs_lynxi_create);
@@ -320,5 +385,142 @@ void mtk_pcs_lynxi_destroy(struct phylin
@@ -319,5 +384,142 @@ void mtk_pcs_lynxi_destroy(struct phylin
}
EXPORT_SYMBOL(mtk_pcs_lynxi_destroy);