]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mlxsw: spectrum: Remove setting of RX software timestamp
authorGal Pressman <gal@nvidia.com>
Wed, 4 Sep 2024 07:49:11 +0000 (10:49 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Sep 2024 08:34:17 +0000 (09:34 +0100)
The responsibility for reporting of RX software timestamp has moved to
the core layer (see __ethtool_get_ts_info()), remove usage from the
device drivers.

Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h

index b9ffd7236aff8168ef719e30f87ddbeeb68689c1..3f5e5d99251b75312e2d74a4da16704fc34de366 100644 (file)
@@ -2786,7 +2786,9 @@ static const struct mlxsw_sp_ptp_ops mlxsw_sp1_ptp_ops = {
        .hwtstamp_get   = mlxsw_sp1_ptp_hwtstamp_get,
        .hwtstamp_set   = mlxsw_sp1_ptp_hwtstamp_set,
        .shaper_work    = mlxsw_sp1_ptp_shaper_work,
+#if IS_REACHABLE(CONFIG_PTP_1588_CLOCK)
        .get_ts_info    = mlxsw_sp1_ptp_get_ts_info,
+#endif
        .get_stats_count = mlxsw_sp1_get_stats_count,
        .get_stats_strings = mlxsw_sp1_get_stats_strings,
        .get_stats      = mlxsw_sp1_get_stats,
@@ -2803,7 +2805,9 @@ static const struct mlxsw_sp_ptp_ops mlxsw_sp2_ptp_ops = {
        .hwtstamp_get   = mlxsw_sp2_ptp_hwtstamp_get,
        .hwtstamp_set   = mlxsw_sp2_ptp_hwtstamp_set,
        .shaper_work    = mlxsw_sp2_ptp_shaper_work,
+#if IS_REACHABLE(CONFIG_PTP_1588_CLOCK)
        .get_ts_info    = mlxsw_sp2_ptp_get_ts_info,
+#endif
        .get_stats_count = mlxsw_sp2_get_stats_count,
        .get_stats_strings = mlxsw_sp2_get_stats_strings,
        .get_stats      = mlxsw_sp2_get_stats,
@@ -2820,7 +2824,9 @@ static const struct mlxsw_sp_ptp_ops mlxsw_sp4_ptp_ops = {
        .hwtstamp_get   = mlxsw_sp2_ptp_hwtstamp_get,
        .hwtstamp_set   = mlxsw_sp2_ptp_hwtstamp_set,
        .shaper_work    = mlxsw_sp2_ptp_shaper_work,
+#if IS_REACHABLE(CONFIG_PTP_1588_CLOCK)
        .get_ts_info    = mlxsw_sp2_ptp_get_ts_info,
+#endif
        .get_stats_count = mlxsw_sp2_get_stats_count,
        .get_stats_strings = mlxsw_sp2_get_stats_strings,
        .get_stats      = mlxsw_sp2_get_stats,
index 769095d4932d588210faebc3ece1a18153ef2553..c8aa1452fbb97321dbbadec921668ad3dbabaad3 100644 (file)
@@ -11,14 +11,6 @@ struct mlxsw_sp;
 struct mlxsw_sp_port;
 struct mlxsw_sp_ptp_clock;
 
-static inline int mlxsw_sp_ptp_get_ts_info_noptp(struct kernel_ethtool_ts_info *info)
-{
-       info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
-                               SOF_TIMESTAMPING_SOFTWARE;
-       info->phc_index = -1;
-       return 0;
-}
-
 #if IS_REACHABLE(CONFIG_PTP_1588_CLOCK)
 
 struct mlxsw_sp_ptp_clock *
@@ -151,12 +143,6 @@ static inline void mlxsw_sp1_ptp_shaper_work(struct work_struct *work)
 {
 }
 
-static inline int mlxsw_sp1_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp,
-                                           struct kernel_ethtool_ts_info *info)
-{
-       return mlxsw_sp_ptp_get_ts_info_noptp(info);
-}
-
 static inline int mlxsw_sp1_get_stats_count(void)
 {
        return 0;
@@ -226,12 +212,6 @@ mlxsw_sp2_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port,
        return -EOPNOTSUPP;
 }
 
-static inline int mlxsw_sp2_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp,
-                                           struct kernel_ethtool_ts_info *info)
-{
-       return mlxsw_sp_ptp_get_ts_info_noptp(info);
-}
-
 static inline int
 mlxsw_sp2_ptp_txhdr_construct(struct mlxsw_core *mlxsw_core,
                              struct mlxsw_sp_port *mlxsw_sp_port,