
Fixes to PCS driver to support 2.5G PHY Signed-off-by: Mantas Pucka <mantas@8devices.com> Link: https://github.com/openwrt/openwrt/pull/18459 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
From 4c432babdc195a0dbef70ca67c92cec8adf01e30 Mon Sep 17 00:00:00 2001
|
|
From: Mantas Pucka <mantas@8devices.com>
|
|
Date: Fri, 28 Mar 2025 14:22:21 +0200
|
|
Subject: [PATCH 5/6] net: pcs: ipq-uniphy: keep autoneg enabled in SGMII mode
|
|
|
|
For PHYs that don't use in-band-status (e.g. 2.5G PHY swiching between
|
|
SGMII and 2500base-x), SGMII autoneg still must be enabled. Only mode
|
|
that should use forced speed is 1000base-x
|
|
|
|
Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
|
---
|
|
drivers/net/pcs/pcs-qcom-ipq-uniphy.c | 9 +++++----
|
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/net/pcs/pcs-qcom-ipq-uniphy.c
|
|
+++ b/drivers/net/pcs/pcs-qcom-ipq-uniphy.c
|
|
@@ -520,7 +520,7 @@ static int ipq_unipcs_config_sgmii(struc
|
|
mutex_unlock(&qunipcs->shared_lock);
|
|
|
|
/* In-band autoneg mode is enabled by default for each PCS channel */
|
|
- if (neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED)
|
|
+ if (interface != PHY_INTERFACE_MODE_1000BASEX)
|
|
return 0;
|
|
|
|
/* Force speed mode */
|
|
@@ -758,10 +758,11 @@ ipq_unipcs_link_up_clock_rate_set(struct
|
|
static void ipq_unipcs_link_up_config_sgmii(struct ipq_uniphy_pcs *qunipcs,
|
|
int channel,
|
|
unsigned int neg_mode,
|
|
- int speed)
|
|
+ int speed,
|
|
+ phy_interface_t interface)
|
|
{
|
|
/* No need to config PCS speed if in-band autoneg is enabled */
|
|
- if (neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED)
|
|
+ if (interface != PHY_INTERFACE_MODE_1000BASEX)
|
|
goto pcs_adapter_reset;
|
|
|
|
/* PCS speed set for force mode */
|
|
@@ -966,7 +967,7 @@ static void ipq_unipcs_link_up(struct ph
|
|
case PHY_INTERFACE_MODE_PSGMII:
|
|
case PHY_INTERFACE_MODE_1000BASEX:
|
|
ipq_unipcs_link_up_config_sgmii(qunipcs, channel,
|
|
- neg_mode, speed);
|
|
+ neg_mode, speed, interface);
|
|
break;
|
|
case PHY_INTERFACE_MODE_2500BASEX:
|
|
ipq_unipcs_link_up_config_2500basex(qunipcs,
|