mirror of
https://github.com/VIKINGYFY/immortalwrt.git
synced 2025-12-16 17:15:26 +00:00
Backport phylink patches for PCS/PHY caps OPs. This makes it easier to align future generic PCS patch and permit supporting special PHY that needs specific tune if "in-band" mode is enabled (for example Aeonsemi PHYs) This is also mainly using the upstream version of the Mediatek patch 739-net-add-negotiation-of-in-band-capabilities. All affected patch automatically refreshed. Link: https://github.com/openwrt/openwrt/pull/20461 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
48 lines
1.5 KiB
Diff
48 lines
1.5 KiB
Diff
From 520d29bdda86915b3caf8c72825a574bff212553 Mon Sep 17 00:00:00 2001
|
|
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
|
Date: Thu, 5 Dec 2024 09:42:29 +0000
|
|
Subject: [PATCH 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps()
|
|
method
|
|
|
|
Report the PCS in-band capabilities to phylink for the LynxI PCS.
|
|
|
|
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
|
Link: https://patch.msgid.link/E1tJ8NR-006L5P-E3@rmk-PC.armlinux.org.uk
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
drivers/net/pcs/pcs-mtk-lynxi.c | 16 ++++++++++++++++
|
|
1 file changed, 16 insertions(+)
|
|
|
|
--- a/drivers/net/pcs/pcs-mtk-lynxi.c
|
|
+++ b/drivers/net/pcs/pcs-mtk-lynxi.c
|
|
@@ -88,6 +88,21 @@ static struct mtk_pcs_lynxi *pcs_to_mtk_
|
|
return container_of(pcs, struct mtk_pcs_lynxi, pcs);
|
|
}
|
|
|
|
+static unsigned int mtk_pcs_lynxi_inband_caps(struct phylink_pcs *pcs,
|
|
+ phy_interface_t interface)
|
|
+{
|
|
+ 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;
|
|
+
|
|
+ default:
|
|
+ return 0;
|
|
+ }
|
|
+}
|
|
+
|
|
static void mtk_pcs_lynxi_get_state(struct phylink_pcs *pcs,
|
|
struct phylink_link_state *state)
|
|
{
|
|
@@ -241,6 +256,7 @@ static void mtk_pcs_lynxi_disable(struct
|
|
}
|
|
|
|
static const struct phylink_pcs_ops mtk_pcs_lynxi_ops = {
|
|
+ .pcs_inband_caps = mtk_pcs_lynxi_inband_caps,
|
|
.pcs_get_state = mtk_pcs_lynxi_get_state,
|
|
.pcs_config = mtk_pcs_lynxi_config,
|
|
.pcs_an_restart = mtk_pcs_lynxi_restart_an,
|