Thread (6 messages) flat view 6 messages, 2 authors, 2025-07-09
STALE400d

[PATCH net-next 3/3] net: phy: qcom: qca807x: Support PHY counter

From: Luo Jie <hidden>
Date: 2025-07-08 16:09:02
Also in: linux-arm-msm, lkml
Subsystem: arm/qualcomm mailing list, ethernet phy library, networking drivers, the rest · Maintainers: Andrew Lunn, Heiner Kallweit, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Within the QCA807X PHY operation's config_init() function, enable CRC
checking for received and transmitted frames to support counter recording,
and add PHY counter operations

Signed-off-by: Luo Jie <redacted>
---
 drivers/net/phy/qcom/qca807x.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/drivers/net/phy/qcom/qca807x.c b/drivers/net/phy/qcom/qca807x.c
index 6d10ef7e9a8a..51101d009dce 100644
--- a/drivers/net/phy/qcom/qca807x.c
+++ b/drivers/net/phy/qcom/qca807x.c
@@ -768,6 +768,10 @@ static int qca807x_config_init(struct phy_device *phydev)
 			return ret;
 	}
 
+	ret = qcom_phy_counter_crc_check_en(phydev);
+	if (ret)
+		return ret;
+
 	control_dac = phy_read_mmd(phydev, MDIO_MMD_AN,
 				   QCA807X_MMD7_1000BASE_T_POWER_SAVE_PER_CABLE_LENGTH);
 	control_dac &= ~QCA807X_CONTROL_DAC_MASK;
@@ -800,6 +804,9 @@ static struct phy_driver qca807x_drivers[] = {
 		.suspend	= genphy_suspend,
 		.cable_test_start	= qca807x_cable_test_start,
 		.cable_test_get_status	= qca808x_cable_test_get_status,
+		.get_sset_count		= qcom_phy_get_sset_count,
+		.get_strings		= qcom_phy_get_strings,
+		.get_stats		= qcom_phy_get_stats,
 	},
 	{
 		PHY_ID_MATCH_EXACT(PHY_ID_QCA8075),
@@ -823,6 +830,9 @@ static struct phy_driver qca807x_drivers[] = {
 		.led_hw_is_supported = qca807x_led_hw_is_supported,
 		.led_hw_control_set = qca807x_led_hw_control_set,
 		.led_hw_control_get = qca807x_led_hw_control_get,
+		.get_sset_count		= qcom_phy_get_sset_count,
+		.get_strings		= qcom_phy_get_strings,
+		.get_stats		= qcom_phy_get_stats,
 	},
 };
 module_phy_driver(qca807x_drivers);
-- 
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help