[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240327054234.1906957-3-c-vankar@ti.com>
Date: Wed, 27 Mar 2024 11:12:34 +0530
From: Chintan Vankar <c-vankar@...com>
To: Dan Carpenter <dan.carpenter@...aro.org>,
Siddharth Vadapalli
<s-vadapalli@...com>,
Grygorii Strashko <grygorii.strashko@...com>,
"Heiner
Kallweit" <hkallweit1@...il.com>,
Vladimir Oltean <vladimir.oltean@....com>,
Chintan Vankar <c-vankar@...com>, Andrew Lunn <andrew@...n.ch>,
Roger Quadros
<rogerq@...nel.org>,
Richard Cochran <richardcochran@...il.com>,
Paolo Abeni
<pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet
<edumazet@...gle.com>,
"David S. Miller" <davem@...emloft.net>
CC: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>
Subject: [PATCH net-next v4 3/3] net: ethernet: ti: am65-cpsw-ethtool: Update rx_filters for CPSW's timestamping capability
Update supported hwtstamp_rx_filters values for CPSW's timestamping
capability.
Signed-off-by: Chintan Vankar <c-vankar@...com>
---
Changes from v3 to v4:
- No changes in v4.
Link to v3:
https://lore.kernel.org/r/20240320102600.3418248-3-c-vankar@ti.com/
drivers/net/ethernet/ti/am65-cpsw-ethtool.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/am65-cpsw-ethtool.c b/drivers/net/ethernet/ti/am65-cpsw-ethtool.c
index d6ce2c9f0a8d..a1d0935d1ebe 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-ethtool.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-ethtool.c
@@ -695,6 +695,17 @@ static int am65_cpsw_get_ethtool_ts_info(struct net_device *ndev,
struct ethtool_ts_info *info)
{
struct am65_cpsw_common *common = am65_ndev_to_common(ndev);
+ unsigned int ptp_v2_filter;
+
+ ptp_v2_filter = BIT(HWTSTAMP_FILTER_PTP_V2_L4_EVENT) |
+ BIT(HWTSTAMP_FILTER_PTP_V2_L4_SYNC) |
+ BIT(HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ) |
+ BIT(HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
+ BIT(HWTSTAMP_FILTER_PTP_V2_L2_SYNC) |
+ BIT(HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ) |
+ BIT(HWTSTAMP_FILTER_PTP_V2_EVENT) |
+ BIT(HWTSTAMP_FILTER_PTP_V2_SYNC) |
+ BIT(HWTSTAMP_FILTER_PTP_V2_DELAY_REQ);
if (!IS_ENABLED(CONFIG_TI_K3_AM65_CPTS))
return ethtool_op_get_ts_info(ndev, info);
@@ -708,7 +719,7 @@ static int am65_cpsw_get_ethtool_ts_info(struct net_device *ndev,
SOF_TIMESTAMPING_RAW_HARDWARE;
info->phc_index = am65_cpts_phc_index(common->cpts);
info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON);
- info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | BIT(HWTSTAMP_FILTER_ALL);
+ info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | ptp_v2_filter;
return 0;
}
--
2.34.1
Powered by blists - more mailing lists