diff mbox series

[net-next,2/2] net: Remove setting of RX software timestamp from drivers

Message ID 20240829144253.122215-3-gal@nvidia.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series RX software timestamp for all | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 16 this patch: 16
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 17 maintainers not CCed: ahmed.zaki@intel.com edumazet@google.com linux-net-drivers@amd.com yajun.deng@linux.dev imx@lists.linux.dev justinstitt@google.com kory.maincent@bootlin.com gerhard@engleder-embedded.com linux-stm32@st-md-mailman.stormreply.com linux-can@vger.kernel.org pabeni@redhat.com intel-wired-lan@lists.osuosl.org liuyonglong@huawei.com linux-arm-kernel@lists.infradead.org linux-omap@vger.kernel.org hkallweit1@gmail.com linux-renesas-soc@vger.kernel.org
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 64 this patch: 64
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 748 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 119 this patch: 119
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-08-30--06-00 (tests: 714)

Commit Message

Gal Pressman Aug. 29, 2024, 2:42 p.m. UTC
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>
---
 drivers/net/bonding/bond_main.c               |  3 ---
 drivers/net/can/dev/dev.c                     |  3 ---
 drivers/net/can/peak_canfd/peak_canfd.c       |  3 ---
 drivers/net/can/usb/peak_usb/pcan_usb_core.c  |  3 ---
 drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c  |  4 ----
 .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c   |  4 ----
 .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  5 +----
 drivers/net/ethernet/broadcom/tg3.c           |  6 +-----
 drivers/net/ethernet/cadence/macb_main.c      |  5 ++---
 .../ethernet/cavium/liquidio/lio_ethtool.c    | 16 +++++++--------
 .../ethernet/cavium/thunder/nicvf_ethtool.c   |  2 --
 .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c    | 11 +++-------
 .../net/ethernet/cisco/enic/enic_ethtool.c    |  4 +---
 drivers/net/ethernet/engleder/tsnep_ethtool.c |  4 ----
 .../ethernet/freescale/enetc/enetc_ethtool.c  | 10 ++--------
 drivers/net/ethernet/freescale/fec_main.c     |  4 ----
 .../net/ethernet/freescale/gianfar_ethtool.c  | 10 ++--------
 .../ethernet/fungible/funeth/funeth_ethtool.c |  5 +----
 .../hisilicon/hns3/hns3pf/hclge_ptp.c         |  4 ----
 .../net/ethernet/intel/i40e/i40e_ethtool.c    |  4 ----
 drivers/net/ethernet/intel/ice/ice_ethtool.c  |  2 --
 drivers/net/ethernet/intel/igb/igb_ethtool.c  |  8 +-------
 drivers/net/ethernet/intel/igc/igc_ethtool.c  |  4 ----
 .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c  |  4 ----
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   |  2 --
 .../marvell/octeontx2/nic/otx2_ethtool.c      |  2 --
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  6 ++++++
 .../ethernet/mellanox/mlxsw/spectrum_ptp.h    | 20 -------------------
 .../net/ethernet/microchip/lan743x_ethtool.c  |  4 ----
 .../microchip/lan966x/lan966x_ethtool.c       | 11 ++++------
 .../microchip/sparx5/sparx5_ethtool.c         | 11 ++++------
 drivers/net/ethernet/mscc/ocelot_ptp.c        | 12 ++++-------
 .../ethernet/pensando/ionic/ionic_ethtool.c   |  2 --
 drivers/net/ethernet/qlogic/qede/qede_ptp.c   |  9 +--------
 drivers/net/ethernet/renesas/ravb_main.c      |  4 ++--
 drivers/net/ethernet/renesas/rswitch.c        |  2 --
 drivers/net/ethernet/renesas/rtsn.c           |  2 --
 drivers/net/ethernet/sfc/ethtool.c            |  5 -----
 drivers/net/ethernet/sfc/siena/ethtool.c      |  5 -----
 .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |  4 ++--
 drivers/net/ethernet/ti/am65-cpsw-ethtool.c   |  2 --
 drivers/net/ethernet/ti/cpsw_ethtool.c        |  7 +------
 drivers/net/ethernet/ti/icssg/icssg_ethtool.c |  2 --
 drivers/net/ethernet/ti/netcp_ethss.c         |  7 +------
 drivers/net/ethernet/xscale/ixp4xx_eth.c      |  4 +---
 drivers/ptp/ptp_ines.c                        |  4 ----
 46 files changed, 47 insertions(+), 208 deletions(-)

Comments

Marc Kleine-Budde Aug. 29, 2024, 4:49 p.m. UTC | #1
On 29.08.2024 17:42:53, Gal Pressman wrote:
> 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>
> ---
>  drivers/net/bonding/bond_main.c               |  3 ---
>  drivers/net/can/dev/dev.c                     |  3 ---
>  drivers/net/can/peak_canfd/peak_canfd.c       |  3 ---
>  drivers/net/can/usb/peak_usb/pcan_usb_core.c  |  3 ---
>  drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c  |  4 ----
>  .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c   |  4 ----
>  .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  5 +----
>  drivers/net/ethernet/broadcom/tg3.c           |  6 +-----
>  drivers/net/ethernet/cadence/macb_main.c      |  5 ++---
>  .../ethernet/cavium/liquidio/lio_ethtool.c    | 16 +++++++--------
>  .../ethernet/cavium/thunder/nicvf_ethtool.c   |  2 --
>  .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c    | 11 +++-------
>  .../net/ethernet/cisco/enic/enic_ethtool.c    |  4 +---
>  drivers/net/ethernet/engleder/tsnep_ethtool.c |  4 ----
>  .../ethernet/freescale/enetc/enetc_ethtool.c  | 10 ++--------
>  drivers/net/ethernet/freescale/fec_main.c     |  4 ----
>  .../net/ethernet/freescale/gianfar_ethtool.c  | 10 ++--------
>  .../ethernet/fungible/funeth/funeth_ethtool.c |  5 +----
>  .../hisilicon/hns3/hns3pf/hclge_ptp.c         |  4 ----
>  .../net/ethernet/intel/i40e/i40e_ethtool.c    |  4 ----
>  drivers/net/ethernet/intel/ice/ice_ethtool.c  |  2 --
>  drivers/net/ethernet/intel/igb/igb_ethtool.c  |  8 +-------
>  drivers/net/ethernet/intel/igc/igc_ethtool.c  |  4 ----
>  .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c  |  4 ----
>  .../net/ethernet/marvell/mvpp2/mvpp2_main.c   |  2 --
>  .../marvell/octeontx2/nic/otx2_ethtool.c      |  2 --
>  .../net/ethernet/mellanox/mlxsw/spectrum.c    |  6 ++++++
>  .../ethernet/mellanox/mlxsw/spectrum_ptp.h    | 20 -------------------
>  .../net/ethernet/microchip/lan743x_ethtool.c  |  4 ----
>  .../microchip/lan966x/lan966x_ethtool.c       | 11 ++++------
>  .../microchip/sparx5/sparx5_ethtool.c         | 11 ++++------
>  drivers/net/ethernet/mscc/ocelot_ptp.c        | 12 ++++-------
>  .../ethernet/pensando/ionic/ionic_ethtool.c   |  2 --
>  drivers/net/ethernet/qlogic/qede/qede_ptp.c   |  9 +--------
>  drivers/net/ethernet/renesas/ravb_main.c      |  4 ++--
>  drivers/net/ethernet/renesas/rswitch.c        |  2 --
>  drivers/net/ethernet/renesas/rtsn.c           |  2 --
>  drivers/net/ethernet/sfc/ethtool.c            |  5 -----
>  drivers/net/ethernet/sfc/siena/ethtool.c      |  5 -----
>  .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |  4 ++--
>  drivers/net/ethernet/ti/am65-cpsw-ethtool.c   |  2 --
>  drivers/net/ethernet/ti/cpsw_ethtool.c        |  7 +------
>  drivers/net/ethernet/ti/icssg/icssg_ethtool.c |  2 --
>  drivers/net/ethernet/ti/netcp_ethss.c         |  7 +------
>  drivers/net/ethernet/xscale/ixp4xx_eth.c      |  4 +---
>  drivers/ptp/ptp_ines.c                        |  4 ----
>  46 files changed, 47 insertions(+), 208 deletions(-)

Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de> # for drivers/net/can

regards,
Marc
Gerhard Engleder Aug. 29, 2024, 7:20 p.m. UTC | #2
On 29.08.24 16:42, Gal Pressman wrote:
> 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>
> ---
>   drivers/net/bonding/bond_main.c               |  3 ---
>   drivers/net/can/dev/dev.c                     |  3 ---
>   drivers/net/can/peak_canfd/peak_canfd.c       |  3 ---
>   drivers/net/can/usb/peak_usb/pcan_usb_core.c  |  3 ---
>   drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c  |  4 ----
>   .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c   |  4 ----
>   .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  5 +----
>   drivers/net/ethernet/broadcom/tg3.c           |  6 +-----
>   drivers/net/ethernet/cadence/macb_main.c      |  5 ++---
>   .../ethernet/cavium/liquidio/lio_ethtool.c    | 16 +++++++--------
>   .../ethernet/cavium/thunder/nicvf_ethtool.c   |  2 --
>   .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c    | 11 +++-------
>   .../net/ethernet/cisco/enic/enic_ethtool.c    |  4 +---
>   drivers/net/ethernet/engleder/tsnep_ethtool.c |  4 ----
>   .../ethernet/freescale/enetc/enetc_ethtool.c  | 10 ++--------
>   drivers/net/ethernet/freescale/fec_main.c     |  4 ----
>   .../net/ethernet/freescale/gianfar_ethtool.c  | 10 ++--------
>   .../ethernet/fungible/funeth/funeth_ethtool.c |  5 +----
>   .../hisilicon/hns3/hns3pf/hclge_ptp.c         |  4 ----
>   .../net/ethernet/intel/i40e/i40e_ethtool.c    |  4 ----
>   drivers/net/ethernet/intel/ice/ice_ethtool.c  |  2 --
>   drivers/net/ethernet/intel/igb/igb_ethtool.c  |  8 +-------
>   drivers/net/ethernet/intel/igc/igc_ethtool.c  |  4 ----
>   .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c  |  4 ----
>   .../net/ethernet/marvell/mvpp2/mvpp2_main.c   |  2 --
>   .../marvell/octeontx2/nic/otx2_ethtool.c      |  2 --
>   .../net/ethernet/mellanox/mlxsw/spectrum.c    |  6 ++++++
>   .../ethernet/mellanox/mlxsw/spectrum_ptp.h    | 20 -------------------
>   .../net/ethernet/microchip/lan743x_ethtool.c  |  4 ----
>   .../microchip/lan966x/lan966x_ethtool.c       | 11 ++++------
>   .../microchip/sparx5/sparx5_ethtool.c         | 11 ++++------
>   drivers/net/ethernet/mscc/ocelot_ptp.c        | 12 ++++-------
>   .../ethernet/pensando/ionic/ionic_ethtool.c   |  2 --
>   drivers/net/ethernet/qlogic/qede/qede_ptp.c   |  9 +--------
>   drivers/net/ethernet/renesas/ravb_main.c      |  4 ++--
>   drivers/net/ethernet/renesas/rswitch.c        |  2 --
>   drivers/net/ethernet/renesas/rtsn.c           |  2 --
>   drivers/net/ethernet/sfc/ethtool.c            |  5 -----
>   drivers/net/ethernet/sfc/siena/ethtool.c      |  5 -----
>   .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |  4 ++--
>   drivers/net/ethernet/ti/am65-cpsw-ethtool.c   |  2 --
>   drivers/net/ethernet/ti/cpsw_ethtool.c        |  7 +------
>   drivers/net/ethernet/ti/icssg/icssg_ethtool.c |  2 --
>   drivers/net/ethernet/ti/netcp_ethss.c         |  7 +------
>   drivers/net/ethernet/xscale/ixp4xx_eth.c      |  4 +---
>   drivers/ptp/ptp_ines.c                        |  4 ----
>   46 files changed, 47 insertions(+), 208 deletions(-)

Reviewed-by: Gerhard Engleder <gerhard@engleder-embedded.com> # for 
drivers/net/ethernet/engleder

Thanks,
Gerhard
Nelson, Shannon Aug. 29, 2024, 8:23 p.m. UTC | #3
On 8/29/2024 7:42 AM, Gal Pressman wrote:
> 
> 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>
> ---

for drivers/net/ethernet/pensando/ionic

Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
Niklas Söderlund Aug. 29, 2024, 8:44 p.m. UTC | #4
Hi Gal,

Thanks for your work.

On 2024-08-29 17:42:53 +0300, Gal Pressman wrote:

> diff --git a/drivers/net/ethernet/renesas/ravb_main.c 
> b/drivers/net/ethernet/renesas/ravb_main.c
> index c02fb296bf7d..c7ec23688d56 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -1744,8 +1744,6 @@ static int ravb_get_ts_info(struct net_device *ndev,
>  
>  	info->so_timestamping =
>  		SOF_TIMESTAMPING_TX_SOFTWARE |
> -		SOF_TIMESTAMPING_RX_SOFTWARE |
> -		SOF_TIMESTAMPING_SOFTWARE |
>  		SOF_TIMESTAMPING_TX_HARDWARE |
>  		SOF_TIMESTAMPING_RX_HARDWARE |
>  		SOF_TIMESTAMPING_RAW_HARDWARE;
> @@ -1756,6 +1754,8 @@ static int ravb_get_ts_info(struct net_device *ndev,
>  		(1 << HWTSTAMP_FILTER_ALL);
>  	if (hw_info->gptp || hw_info->ccc_gac)
>  		info->phc_index = ptp_clock_index(priv->ptp.clock);
> +	else
> +		info->phc_index = 0;

I understand this work keeps things the same as they where before and 
that this change do not alter the existing behavior. But should not 
phc_index be left untouched here (kept at -1) as there are no ptp clock?

I think this might have been introduced in commit 7e09a052dc4e ("ravb: 
Exclude gPTP feature support for RZ/G2L") when the driver excluded ptp 
support for some devices. I suspect the so_timestamping mask should also 
depend on this check and only advertise hardware clocks if it indeed 
exists?

If my assumption is correct I can fix this on top. For this change the 
existing behavior is kept, so for drivers/net/ethernet/renesas,

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

>  
>  	return 0;
>  }
Jijie Shao Aug. 30, 2024, 1:28 a.m. UTC | #5
on 2024/8/29 22:42, Gal Pressman wrote:
> 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>
> ---
>   drivers/net/bonding/bond_main.c               |  3 ---
>   drivers/net/can/dev/dev.c                     |  3 ---
>   drivers/net/can/peak_canfd/peak_canfd.c       |  3 ---
>   drivers/net/can/usb/peak_usb/pcan_usb_core.c  |  3 ---
>   drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c  |  4 ----
>   .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c   |  4 ----
>   .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  5 +----
>   drivers/net/ethernet/broadcom/tg3.c           |  6 +-----
>   drivers/net/ethernet/cadence/macb_main.c      |  5 ++---
>   .../ethernet/cavium/liquidio/lio_ethtool.c    | 16 +++++++--------
>   .../ethernet/cavium/thunder/nicvf_ethtool.c   |  2 --
>   .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c    | 11 +++-------
>   .../net/ethernet/cisco/enic/enic_ethtool.c    |  4 +---
>   drivers/net/ethernet/engleder/tsnep_ethtool.c |  4 ----
>   .../ethernet/freescale/enetc/enetc_ethtool.c  | 10 ++--------
>   drivers/net/ethernet/freescale/fec_main.c     |  4 ----
>   .../net/ethernet/freescale/gianfar_ethtool.c  | 10 ++--------
>   .../ethernet/fungible/funeth/funeth_ethtool.c |  5 +----
>   .../hisilicon/hns3/hns3pf/hclge_ptp.c         |  4 ----

for drivers/net/ethernet/hisilicon/hns3/

Reviewed-by: Jijie Shao<shaojijie@huawei.com>
Wei Fang Aug. 30, 2024, 1:49 a.m. UTC | #6
>  .../ethernet/freescale/enetc/enetc_ethtool.c  | 10 ++--------
>  drivers/net/ethernet/freescale/fec_main.c     |  4 ----

Many thanks.
For drivers/net/ethernet/freescale/fec and enetc.
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Subbaraya Sundeep Aug. 30, 2024, 6 a.m. UTC | #7
On 2024-08-29 at 20:12:53, Gal Pressman (gal@nvidia.com) wrote:
> 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>
> ---

for drivers/net/ethernet/marvell/octeontx2/

Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com>
Raju Lakkaraju - I30499 Aug. 30, 2024, 6:10 a.m. UTC | #8
> [Some people who received this message don't often get email from
> gal@nvidia.com. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> 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>
> ---

> diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c
> b/drivers/net/ethernet/microchip/lan743x_ethtool.c
> index 3a63ec091413..0f1c0edec460 100644
> --- a/drivers/net/ethernet/microchip/lan743x_ethtool.c
> +++ b/drivers/net/ethernet/microchip/lan743x_ethtool.c
> @@ -1034,16 +1034,12 @@ static int lan743x_ethtool_get_ts_info(struct
> net_device *netdev,
>         struct lan743x_adapter *adapter = netdev_priv(netdev);
> 
>         ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
> -                                  SOF_TIMESTAMPING_RX_SOFTWARE |
> -                                  SOF_TIMESTAMPING_SOFTWARE |
>                                    SOF_TIMESTAMPING_TX_HARDWARE |
>                                    SOF_TIMESTAMPING_RX_HARDWARE |
>                                    SOF_TIMESTAMPING_RAW_HARDWARE;
> 
>         if (adapter->ptp.ptp_clock)
>                 ts_info->phc_index = ptp_clock_index(adapter->ptp.ptp_clock);
> -       else
> -               ts_info->phc_index = -1;
> 
>         ts_info->tx_types = BIT(HWTSTAMP_TX_OFF) |
>                             BIT(HWTSTAMP_TX_ON) |


for drivers/net/ethernet/microchip/lan743x_ethtool.c

Reviewed-by: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
Petr Machata Aug. 30, 2024, 9:58 a.m. UTC | #9
Gal Pressman <gal@nvidia.com> writes:

> diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
> index f064789f3240..b749879b3daa 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c

> diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h
> index 769095d4932d..c8aa1452fbb9 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h
> +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h

Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
Roger Quadros Aug. 30, 2024, 11:49 a.m. UTC | #10
On 29/08/2024 17:42, Gal Pressman wrote:
> 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>


for:

drivers/net/ethernet/ti/am65-cpsw-ethtool.c
drivers/net/ethernet/ti/cpsw_ethtool.c
drivers/net/ethernet/ti/icssg/icssg_ethtool.c

Reviewed-by: Roger Quadros <rogerq@kernel.org>
Gal Pressman Aug. 30, 2024, 5:07 p.m. UTC | #11
On 29/08/2024 23:44, Niklas Söderlund wrote:
> Hi Gal,
> 
> Thanks for your work.
> 
> On 2024-08-29 17:42:53 +0300, Gal Pressman wrote:
> 
>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c 
>> b/drivers/net/ethernet/renesas/ravb_main.c
>> index c02fb296bf7d..c7ec23688d56 100644
>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
>> @@ -1744,8 +1744,6 @@ static int ravb_get_ts_info(struct net_device *ndev,
>>  
>>  	info->so_timestamping =
>>  		SOF_TIMESTAMPING_TX_SOFTWARE |
>> -		SOF_TIMESTAMPING_RX_SOFTWARE |
>> -		SOF_TIMESTAMPING_SOFTWARE |
>>  		SOF_TIMESTAMPING_TX_HARDWARE |
>>  		SOF_TIMESTAMPING_RX_HARDWARE |
>>  		SOF_TIMESTAMPING_RAW_HARDWARE;
>> @@ -1756,6 +1754,8 @@ static int ravb_get_ts_info(struct net_device *ndev,
>>  		(1 << HWTSTAMP_FILTER_ALL);
>>  	if (hw_info->gptp || hw_info->ccc_gac)
>>  		info->phc_index = ptp_clock_index(priv->ptp.clock);
>> +	else
>> +		info->phc_index = 0;
> 
> I understand this work keeps things the same as they where before and 
> that this change do not alter the existing behavior. But should not 
> phc_index be left untouched here (kept at -1) as there are no ptp clock?

Yes, setting the phc_index to zero felt bad and is likely a bug, but
this patch is probably not the place to fix it.

> 
> I think this might have been introduced in commit 7e09a052dc4e ("ravb: 
> Exclude gPTP feature support for RZ/G2L") when the driver excluded ptp 
> support for some devices. I suspect the so_timestamping mask should also 
> depend on this check and only advertise hardware clocks if it indeed 
> exists?
> 
> If my assumption is correct I can fix this on top. For this change the 
> existing behavior is kept, so for drivers/net/ethernet/renesas,

Sounds good to me.

> 
> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Thank you Niklas!
Tony Nguyen Aug. 30, 2024, 8:39 p.m. UTC | #12
On 8/29/2024 7:42 AM, Gal Pressman wrote:
> 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>
> ---
>   drivers/net/bonding/bond_main.c               |  3 ---
>   drivers/net/can/dev/dev.c                     |  3 ---
>   drivers/net/can/peak_canfd/peak_canfd.c       |  3 ---
>   drivers/net/can/usb/peak_usb/pcan_usb_core.c  |  3 ---
>   drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c  |  4 ----
>   .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c   |  4 ----
>   .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  5 +----
>   drivers/net/ethernet/broadcom/tg3.c           |  6 +-----
>   drivers/net/ethernet/cadence/macb_main.c      |  5 ++---
>   .../ethernet/cavium/liquidio/lio_ethtool.c    | 16 +++++++--------
>   .../ethernet/cavium/thunder/nicvf_ethtool.c   |  2 --
>   .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c    | 11 +++-------
>   .../net/ethernet/cisco/enic/enic_ethtool.c    |  4 +---
>   drivers/net/ethernet/engleder/tsnep_ethtool.c |  4 ----
>   .../ethernet/freescale/enetc/enetc_ethtool.c  | 10 ++--------
>   drivers/net/ethernet/freescale/fec_main.c     |  4 ----
>   .../net/ethernet/freescale/gianfar_ethtool.c  | 10 ++--------
>   .../ethernet/fungible/funeth/funeth_ethtool.c |  5 +----
>   .../hisilicon/hns3/hns3pf/hclge_ptp.c         |  4 ----
>   .../net/ethernet/intel/i40e/i40e_ethtool.c    |  4 ----
>   drivers/net/ethernet/intel/ice/ice_ethtool.c  |  2 --
>   drivers/net/ethernet/intel/igb/igb_ethtool.c  |  8 +-------
>   drivers/net/ethernet/intel/igc/igc_ethtool.c  |  4 ----
>   .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c  |  4 ----

Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> # for 
drivers/net/ethernet/intel/
Richard Cochran Aug. 30, 2024, 9:16 p.m. UTC | #13
On Thu, Aug 29, 2024 at 05:42:53PM +0300, Gal Pressman wrote:

>  drivers/net/bonding/bond_main.c               |  3 ---
>  drivers/net/can/dev/dev.c                     |  3 ---
>  drivers/net/can/peak_canfd/peak_canfd.c       |  3 ---

...

>  drivers/net/ethernet/ti/netcp_ethss.c         |  7 +------
>  drivers/net/ethernet/xscale/ixp4xx_eth.c      |  4 +---
>  drivers/ptp/ptp_ines.c                        |  4 ----
>  46 files changed, 47 insertions(+), 208 deletions(-)

This needs to be broken out into one patch per driver.
That way, one can easily track the Acks.

Thanks,
Richard
Potnuri Bharat Teja Aug. 31, 2024, 10:33 a.m. UTC | #14
On Thursday, August 08/29/24, 2024 at 20:12:53 +0530, Gal Pressman wrote:
> 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>
> ---
>  drivers/net/bonding/bond_main.c               |  3 ---
>  drivers/net/can/dev/dev.c                     |  3 ---
>  drivers/net/can/peak_canfd/peak_canfd.c       |  3 ---
>  drivers/net/can/usb/peak_usb/pcan_usb_core.c  |  3 ---
>  drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c  |  4 ----
>  .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c   |  4 ----
>  .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  5 +----
>  drivers/net/ethernet/broadcom/tg3.c           |  6 +-----
>  drivers/net/ethernet/cadence/macb_main.c      |  5 ++---
>  .../ethernet/cavium/liquidio/lio_ethtool.c    | 16 +++++++--------
>  .../ethernet/cavium/thunder/nicvf_ethtool.c   |  2 --
>  .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c    | 11 +++-------

for cxgb4 changes
Reviewed-by: Potnuri Bharat Teja <bharat@chelsio.com>
Gal Pressman Aug. 31, 2024, 5:19 p.m. UTC | #15
On 31/08/2024 0:16, Richard Cochran wrote:
> On Thu, Aug 29, 2024 at 05:42:53PM +0300, Gal Pressman wrote:
> 
>>  drivers/net/bonding/bond_main.c               |  3 ---
>>  drivers/net/can/dev/dev.c                     |  3 ---
>>  drivers/net/can/peak_canfd/peak_canfd.c       |  3 ---
> 
> ...
> 
>>  drivers/net/ethernet/ti/netcp_ethss.c         |  7 +------
>>  drivers/net/ethernet/xscale/ixp4xx_eth.c      |  4 +---
>>  drivers/ptp/ptp_ines.c                        |  4 ----
>>  46 files changed, 47 insertions(+), 208 deletions(-)
> 
> This needs to be broken out into one patch per driver.
> That way, one can easily track the Acks.

I would, but it's not allowed to post series with more than 15 patches.
Richard Cochran Aug. 31, 2024, 8:13 p.m. UTC | #16
On Sat, Aug 31, 2024 at 08:19:06PM +0300, Gal Pressman wrote:
> I would, but it's not allowed to post series with more than 15 patches.

If that worries you, then you can post in batches.

Thanks,
Richard
Martin Habets Sept. 2, 2024, 8:25 a.m. UTC | #17
On Thu, Aug 29, 2024 at 05:42:53PM +0300, Gal Pressman wrote:
> 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>
> ---
>  drivers/net/bonding/bond_main.c               |  3 ---
>  drivers/net/can/dev/dev.c                     |  3 ---
>  drivers/net/can/peak_canfd/peak_canfd.c       |  3 ---
>  drivers/net/can/usb/peak_usb/pcan_usb_core.c  |  3 ---
>  drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c  |  4 ----
>  .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c   |  4 ----
>  .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  5 +----
>  drivers/net/ethernet/broadcom/tg3.c           |  6 +-----
>  drivers/net/ethernet/cadence/macb_main.c      |  5 ++---
>  .../ethernet/cavium/liquidio/lio_ethtool.c    | 16 +++++++--------
>  .../ethernet/cavium/thunder/nicvf_ethtool.c   |  2 --
>  .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c    | 11 +++-------
>  .../net/ethernet/cisco/enic/enic_ethtool.c    |  4 +---
>  drivers/net/ethernet/engleder/tsnep_ethtool.c |  4 ----
>  .../ethernet/freescale/enetc/enetc_ethtool.c  | 10 ++--------
>  drivers/net/ethernet/freescale/fec_main.c     |  4 ----
>  .../net/ethernet/freescale/gianfar_ethtool.c  | 10 ++--------
>  .../ethernet/fungible/funeth/funeth_ethtool.c |  5 +----
>  .../hisilicon/hns3/hns3pf/hclge_ptp.c         |  4 ----
>  .../net/ethernet/intel/i40e/i40e_ethtool.c    |  4 ----
>  drivers/net/ethernet/intel/ice/ice_ethtool.c  |  2 --
>  drivers/net/ethernet/intel/igb/igb_ethtool.c  |  8 +-------
>  drivers/net/ethernet/intel/igc/igc_ethtool.c  |  4 ----
>  .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c  |  4 ----
>  .../net/ethernet/marvell/mvpp2/mvpp2_main.c   |  2 --
>  .../marvell/octeontx2/nic/otx2_ethtool.c      |  2 --
>  .../net/ethernet/mellanox/mlxsw/spectrum.c    |  6 ++++++
>  .../ethernet/mellanox/mlxsw/spectrum_ptp.h    | 20 -------------------
>  .../net/ethernet/microchip/lan743x_ethtool.c  |  4 ----
>  .../microchip/lan966x/lan966x_ethtool.c       | 11 ++++------
>  .../microchip/sparx5/sparx5_ethtool.c         | 11 ++++------
>  drivers/net/ethernet/mscc/ocelot_ptp.c        | 12 ++++-------
>  .../ethernet/pensando/ionic/ionic_ethtool.c   |  2 --
>  drivers/net/ethernet/qlogic/qede/qede_ptp.c   |  9 +--------
>  drivers/net/ethernet/renesas/ravb_main.c      |  4 ++--
>  drivers/net/ethernet/renesas/rswitch.c        |  2 --
>  drivers/net/ethernet/renesas/rtsn.c           |  2 --
>  drivers/net/ethernet/sfc/ethtool.c            |  5 -----
>  drivers/net/ethernet/sfc/siena/ethtool.c      |  5 -----
>  .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |  4 ++--
>  drivers/net/ethernet/ti/am65-cpsw-ethtool.c   |  2 --
>  drivers/net/ethernet/ti/cpsw_ethtool.c        |  7 +------
>  drivers/net/ethernet/ti/icssg/icssg_ethtool.c |  2 --
>  drivers/net/ethernet/ti/netcp_ethss.c         |  7 +------
>  drivers/net/ethernet/xscale/ixp4xx_eth.c      |  4 +---
>  drivers/ptp/ptp_ines.c                        |  4 ----
>  46 files changed, 47 insertions(+), 208 deletions(-)

For drivers/net/ethernet/sfc and drivers/net/ethernet/sfc/siena:

Reviewed-by: Martin Habets <habetsm.xilinx@gmail.com>
Shyam Sundar S K Sept. 2, 2024, 8:38 a.m. UTC | #18
On 8/29/2024 20:12, Gal Pressman wrote:
> 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>
> ---
>  drivers/net/bonding/bond_main.c               |  3 ---
>  drivers/net/can/dev/dev.c                     |  3 ---
>  drivers/net/can/peak_canfd/peak_canfd.c       |  3 ---
>  drivers/net/can/usb/peak_usb/pcan_usb_core.c  |  3 ---
>  drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c  |  4 ----
>  .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c   |  4 ----
>  .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  5 +----
>  drivers/net/ethernet/broadcom/tg3.c           |  6 +-----
>  drivers/net/ethernet/cadence/macb_main.c      |  5 ++---
>  .../ethernet/cavium/liquidio/lio_ethtool.c    | 16 +++++++--------
>  .../ethernet/cavium/thunder/nicvf_ethtool.c   |  2 --
>  .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c    | 11 +++-------
>  .../net/ethernet/cisco/enic/enic_ethtool.c    |  4 +---
>  drivers/net/ethernet/engleder/tsnep_ethtool.c |  4 ----
>  .../ethernet/freescale/enetc/enetc_ethtool.c  | 10 ++--------
>  drivers/net/ethernet/freescale/fec_main.c     |  4 ----
>  .../net/ethernet/freescale/gianfar_ethtool.c  | 10 ++--------
>  .../ethernet/fungible/funeth/funeth_ethtool.c |  5 +----
>  .../hisilicon/hns3/hns3pf/hclge_ptp.c         |  4 ----
>  .../net/ethernet/intel/i40e/i40e_ethtool.c    |  4 ----
>  drivers/net/ethernet/intel/ice/ice_ethtool.c  |  2 --
>  drivers/net/ethernet/intel/igb/igb_ethtool.c  |  8 +-------
>  drivers/net/ethernet/intel/igc/igc_ethtool.c  |  4 ----
>  .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c  |  4 ----
>  .../net/ethernet/marvell/mvpp2/mvpp2_main.c   |  2 --
>  .../marvell/octeontx2/nic/otx2_ethtool.c      |  2 --
>  .../net/ethernet/mellanox/mlxsw/spectrum.c    |  6 ++++++
>  .../ethernet/mellanox/mlxsw/spectrum_ptp.h    | 20 -------------------
>  .../net/ethernet/microchip/lan743x_ethtool.c  |  4 ----
>  .../microchip/lan966x/lan966x_ethtool.c       | 11 ++++------
>  .../microchip/sparx5/sparx5_ethtool.c         | 11 ++++------
>  drivers/net/ethernet/mscc/ocelot_ptp.c        | 12 ++++-------
>  .../ethernet/pensando/ionic/ionic_ethtool.c   |  2 --
>  drivers/net/ethernet/qlogic/qede/qede_ptp.c   |  9 +--------
>  drivers/net/ethernet/renesas/ravb_main.c      |  4 ++--
>  drivers/net/ethernet/renesas/rswitch.c        |  2 --
>  drivers/net/ethernet/renesas/rtsn.c           |  2 --
>  drivers/net/ethernet/sfc/ethtool.c            |  5 -----
>  drivers/net/ethernet/sfc/siena/ethtool.c      |  5 -----
>  .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |  4 ++--
>  drivers/net/ethernet/ti/am65-cpsw-ethtool.c   |  2 --
>  drivers/net/ethernet/ti/cpsw_ethtool.c        |  7 +------
>  drivers/net/ethernet/ti/icssg/icssg_ethtool.c |  2 --
>  drivers/net/ethernet/ti/netcp_ethss.c         |  7 +------
>  drivers/net/ethernet/xscale/ixp4xx_eth.c      |  4 +---
>  drivers/ptp/ptp_ines.c                        |  4 ----
>  46 files changed, 47 insertions(+), 208 deletions(-)
> 

Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> # for
drivers/net/ethernet/amd/xgbe/

Thanks,
Shyam
diff mbox series

Patch

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index f9633a6f8571..83c406b8b12c 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -5770,9 +5770,6 @@  static int bond_ethtool_get_ts_info(struct net_device *bond_dev,
 	if (real_dev) {
 		ret = ethtool_get_ts_info_by_layer(real_dev, info);
 	} else {
-		info->phc_index = -1;
-		info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
-					SOF_TIMESTAMPING_SOFTWARE;
 		/* Check if all slaves support software tx timestamping */
 		rcu_read_lock();
 		bond_for_each_slave_rcu(bond, slave, iter) {
diff --git a/drivers/net/can/dev/dev.c b/drivers/net/can/dev/dev.c
index 87828f953073..6792c14fd7eb 100644
--- a/drivers/net/can/dev/dev.c
+++ b/drivers/net/can/dev/dev.c
@@ -380,12 +380,9 @@  int can_ethtool_op_get_ts_info_hwts(struct net_device *dev,
 {
 	info->so_timestamping =
 		SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
-	info->phc_index = -1;
 	info->tx_types = BIT(HWTSTAMP_TX_ON);
 	info->rx_filters = BIT(HWTSTAMP_FILTER_ALL);
 
diff --git a/drivers/net/can/peak_canfd/peak_canfd.c b/drivers/net/can/peak_canfd/peak_canfd.c
index b50005397463..28f3fd805273 100644
--- a/drivers/net/can/peak_canfd/peak_canfd.c
+++ b/drivers/net/can/peak_canfd/peak_canfd.c
@@ -781,11 +781,8 @@  static int peak_get_ts_info(struct net_device *dev,
 {
 	info->so_timestamping =
 		SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
-	info->phc_index = -1;
 	info->tx_types = BIT(HWTSTAMP_TX_OFF);
 	info->rx_filters = BIT(HWTSTAMP_FILTER_ALL);
 
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
index 3d68fef46ded..59f7cd8ceb39 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
@@ -901,11 +901,8 @@  int pcan_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *info
 {
 	info->so_timestamping =
 		SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
-	info->phc_index = -1;
 	info->tx_types = BIT(HWTSTAMP_TX_OFF);
 	info->rx_filters = BIT(HWTSTAMP_FILTER_ALL);
 
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
index 21407a26f806..5fc94c2f638e 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
@@ -582,16 +582,12 @@  static int xgbe_get_ts_info(struct net_device *netdev,
 	struct xgbe_prv_data *pdata = netdev_priv(netdev);
 
 	ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				   SOF_TIMESTAMPING_RX_SOFTWARE |
-				   SOF_TIMESTAMPING_SOFTWARE |
 				   SOF_TIMESTAMPING_TX_HARDWARE |
 				   SOF_TIMESTAMPING_RX_HARDWARE |
 				   SOF_TIMESTAMPING_RAW_HARDWARE;
 
 	if (pdata->ptp_clock)
 		ts_info->phc_index = ptp_clock_index(pdata->ptp_clock);
-	else
-		ts_info->phc_index = -1;
 
 	ts_info->tx_types = (1 << HWTSTAMP_TX_OFF) | (1 << HWTSTAMP_TX_ON);
 	ts_info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index c7b56a5e5425..adf7b6b94941 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -3640,16 +3640,12 @@  static int bnx2x_get_ts_info(struct net_device *dev,
 
 	if (bp->flags & PTP_SUPPORTED) {
 		info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-					SOF_TIMESTAMPING_RX_SOFTWARE |
-					SOF_TIMESTAMPING_SOFTWARE |
 					SOF_TIMESTAMPING_TX_HARDWARE |
 					SOF_TIMESTAMPING_RX_HARDWARE |
 					SOF_TIMESTAMPING_RAW_HARDWARE;
 
 		if (bp->ptp_clock)
 			info->phc_index = ptp_clock_index(bp->ptp_clock);
-		else
-			info->phc_index = -1;
 
 		info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
 				   (1 << HWTSTAMP_FILTER_PTP_V1_L4_EVENT) |
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
index 9dadc89378f0..8fe680e691a3 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
@@ -5040,11 +5040,8 @@  static int bnxt_get_ts_info(struct net_device *dev,
 	struct bnxt_ptp_cfg *ptp;
 
 	ptp = bp->ptp_cfg;
-	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE;
+	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
 
-	info->phc_index = -1;
 	if (!ptp)
 		return 0;
 
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 0ec5f01551f9..378815917741 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -6145,9 +6145,7 @@  static int tg3_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info
 {
 	struct tg3 *tp = netdev_priv(dev);
 
-	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE;
+	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
 
 	if (tg3_flag(tp, PTP_CAPABLE)) {
 		info->so_timestamping |= SOF_TIMESTAMPING_TX_HARDWARE |
@@ -6157,8 +6155,6 @@  static int tg3_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info
 
 	if (tp->ptp_clock)
 		info->phc_index = ptp_clock_index(tp->ptp_clock);
-	else
-		info->phc_index = -1;
 
 	info->tx_types = (1 << HWTSTAMP_TX_OFF) | (1 << HWTSTAMP_TX_ON);
 
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 95e8742dce1d..e41929c61a04 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -3410,8 +3410,6 @@  static int gem_get_ts_info(struct net_device *dev,
 
 	info->so_timestamping =
 		SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
@@ -3423,7 +3421,8 @@  static int gem_get_ts_info(struct net_device *dev,
 		(1 << HWTSTAMP_FILTER_NONE) |
 		(1 << HWTSTAMP_FILTER_ALL);
 
-	info->phc_index = bp->ptp_clock ? ptp_clock_index(bp->ptp_clock) : -1;
+	if (bp->ptp_clock)
+		info->phc_index = ptp_clock_index(bp->ptp_clock);
 
 	return 0;
 }
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
index 5835965dbc32..c849e2c871a9 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
@@ -2496,37 +2496,31 @@  static int lio_set_intr_coalesce(struct net_device *netdev,
 	return ret;
 }
 
+#ifdef PTP_HARDWARE_TIMESTAMPING
 static int lio_get_ts_info(struct net_device *netdev,
 			   struct kernel_ethtool_ts_info *info)
 {
 	struct lio *lio = GET_LIO(netdev);
 
 	info->so_timestamping =
-#ifdef PTP_HARDWARE_TIMESTAMPING
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE |
-		SOF_TIMESTAMPING_TX_SOFTWARE |
-#endif
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE;
+		SOF_TIMESTAMPING_TX_SOFTWARE;
 
 	if (lio->ptp_clock)
 		info->phc_index = ptp_clock_index(lio->ptp_clock);
-	else
-		info->phc_index = -1;
 
-#ifdef PTP_HARDWARE_TIMESTAMPING
 	info->tx_types = (1 << HWTSTAMP_TX_OFF) | (1 << HWTSTAMP_TX_ON);
 
 	info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
 			   (1 << HWTSTAMP_FILTER_PTP_V1_L4_EVENT) |
 			   (1 << HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
 			   (1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT);
-#endif
 
 	return 0;
 }
+#endif
 
 /* Return register dump len. */
 static int lio_get_regs_len(struct net_device *dev)
@@ -3146,7 +3140,9 @@  static const struct ethtool_ops lio_ethtool_ops = {
 	.set_coalesce		= lio_set_intr_coalesce,
 	.get_priv_flags		= lio_get_priv_flags,
 	.set_priv_flags		= lio_set_priv_flags,
+#ifdef PTP_HARDWARE_TIMESTAMPING
 	.get_ts_info		= lio_get_ts_info,
+#endif
 };
 
 static const struct ethtool_ops lio_vf_ethtool_ops = {
@@ -3169,7 +3165,9 @@  static const struct ethtool_ops lio_vf_ethtool_ops = {
 	.set_coalesce		= lio_set_intr_coalesce,
 	.get_priv_flags		= lio_get_priv_flags,
 	.set_priv_flags		= lio_set_priv_flags,
+#ifdef PTP_HARDWARE_TIMESTAMPING
 	.get_ts_info		= lio_get_ts_info,
+#endif
 };
 
 void liquidio_set_ethtool_ops(struct net_device *netdev)
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
index 6a04d2530176..d0ff0c170b1a 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
@@ -844,8 +844,6 @@  static int nicvf_get_ts_info(struct net_device *netdev,
 		return ethtool_op_get_ts_info(netdev, info);
 
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
index 3d091947ae00..7f3f5afa864f 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
@@ -1556,12 +1556,9 @@  static int get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *ts
 	struct  adapter *adapter = pi->adapter;
 
 	ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				   SOF_TIMESTAMPING_RX_SOFTWARE |
-				   SOF_TIMESTAMPING_SOFTWARE;
-
-	ts_info->so_timestamping |= SOF_TIMESTAMPING_RX_HARDWARE |
-				    SOF_TIMESTAMPING_TX_HARDWARE |
-				    SOF_TIMESTAMPING_RAW_HARDWARE;
+				   SOF_TIMESTAMPING_RX_HARDWARE |
+				   SOF_TIMESTAMPING_TX_HARDWARE |
+				   SOF_TIMESTAMPING_RAW_HARDWARE;
 
 	ts_info->tx_types = (1 << HWTSTAMP_TX_OFF) |
 			    (1 << HWTSTAMP_TX_ON);
@@ -1575,8 +1572,6 @@  static int get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *ts
 
 	if (adapter->ptp_clock)
 		ts_info->phc_index = ptp_clock_index(adapter->ptp_clock);
-	else
-		ts_info->phc_index = -1;
 
 	return 0;
 }
diff --git a/drivers/net/ethernet/cisco/enic/enic_ethtool.c b/drivers/net/ethernet/cisco/enic/enic_ethtool.c
index f2f1055880b2..31685ee304c6 100644
--- a/drivers/net/ethernet/cisco/enic/enic_ethtool.c
+++ b/drivers/net/ethernet/cisco/enic/enic_ethtool.c
@@ -601,9 +601,7 @@  static int enic_set_rxfh(struct net_device *netdev,
 static int enic_get_ts_info(struct net_device *netdev,
 			    struct kernel_ethtool_ts_info *info)
 {
-	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE;
+	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
 
 	return 0;
 }
diff --git a/drivers/net/ethernet/engleder/tsnep_ethtool.c b/drivers/net/ethernet/engleder/tsnep_ethtool.c
index 9aa286ba1f00..228a638eae16 100644
--- a/drivers/net/ethernet/engleder/tsnep_ethtool.c
+++ b/drivers/net/ethernet/engleder/tsnep_ethtool.c
@@ -310,16 +310,12 @@  static int tsnep_ethtool_get_ts_info(struct net_device *netdev,
 	struct tsnep_adapter *adapter = netdev_priv(netdev);
 
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
 
 	if (adapter->ptp_clock)
 		info->phc_index = ptp_clock_index(adapter->ptp_clock);
-	else
-		info->phc_index = -1;
 
 	info->tx_types = BIT(HWTSTAMP_TX_OFF) |
 			 BIT(HWTSTAMP_TX_ON);
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
index 5e684b23c5f5..47c478e08d44 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
@@ -849,17 +849,13 @@  static int enetc_get_ts_info(struct net_device *ndev,
 	if (phc_idx) {
 		info->phc_index = *phc_idx;
 		symbol_put(enetc_phc_index);
-	} else {
-		info->phc_index = -1;
 	}
 
 #ifdef CONFIG_FSL_ENETC_PTP_CLOCK
 	info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE |
-				SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE;
+				SOF_TIMESTAMPING_TX_SOFTWARE;
 
 	info->tx_types = (1 << HWTSTAMP_TX_OFF) |
 			 (1 << HWTSTAMP_TX_ON) |
@@ -867,9 +863,7 @@  static int enetc_get_ts_info(struct net_device *ndev,
 	info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
 			   (1 << HWTSTAMP_FILTER_ALL);
 #else
-	info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE;
+	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
 #endif
 	return 0;
 }
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 8c3bf0faba63..acbb627d51bf 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2775,15 +2775,11 @@  static int fec_enet_get_ts_info(struct net_device *ndev,
 	if (fep->bufdesc_ex) {
 
 		info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-					SOF_TIMESTAMPING_RX_SOFTWARE |
-					SOF_TIMESTAMPING_SOFTWARE |
 					SOF_TIMESTAMPING_TX_HARDWARE |
 					SOF_TIMESTAMPING_RX_HARDWARE |
 					SOF_TIMESTAMPING_RAW_HARDWARE;
 		if (fep->ptp_clock)
 			info->phc_index = ptp_clock_index(fep->ptp_clock);
-		else
-			info->phc_index = -1;
 
 		info->tx_types = (1 << HWTSTAMP_TX_OFF) |
 				 (1 << HWTSTAMP_TX_ON);
diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index f581402ad740..a99b95c4bcfb 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -1455,12 +1455,8 @@  static int gfar_get_ts_info(struct net_device *dev,
 	struct device_node *ptp_node;
 	struct ptp_qoriq *ptp = NULL;
 
-	info->phc_index = -1;
-
 	if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER)) {
-		info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
-					SOF_TIMESTAMPING_TX_SOFTWARE |
-					SOF_TIMESTAMPING_SOFTWARE;
+		info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
 		return 0;
 	}
 
@@ -1478,9 +1474,7 @@  static int gfar_get_ts_info(struct net_device *dev,
 	info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE;
+				SOF_TIMESTAMPING_TX_SOFTWARE;
 	info->tx_types = (1 << HWTSTAMP_TX_OFF) |
 			 (1 << HWTSTAMP_TX_ON);
 	info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
diff --git a/drivers/net/ethernet/fungible/funeth/funeth_ethtool.c b/drivers/net/ethernet/fungible/funeth/funeth_ethtool.c
index 7f081e6e8c87..ba83dbf4ed22 100644
--- a/drivers/net/ethernet/fungible/funeth/funeth_ethtool.c
+++ b/drivers/net/ethernet/fungible/funeth/funeth_ethtool.c
@@ -1042,12 +1042,9 @@  static int fun_set_rxfh(struct net_device *netdev,
 static int fun_get_ts_info(struct net_device *netdev,
 			   struct kernel_ethtool_ts_info *info)
 {
-	info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_HARDWARE |
+	info->so_timestamping = SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
-	info->phc_index = -1;
 	info->tx_types = BIT(HWTSTAMP_TX_OFF);
 	info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | BIT(HWTSTAMP_FILTER_ALL);
 	return 0;
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
index 5fff8ed388f8..5505caea88e9 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
@@ -389,16 +389,12 @@  int hclge_ptp_get_ts_info(struct hnae3_handle *handle,
 	}
 
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
 
 	if (hdev->ptp->clock)
 		info->phc_index = ptp_clock_index(hdev->ptp->clock);
-	else
-		info->phc_index = -1;
 
 	info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON);
 
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 1d0d2e526adb..2e57de16368b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -2555,16 +2555,12 @@  static int i40e_get_ts_info(struct net_device *dev,
 		return ethtool_op_get_ts_info(dev, info);
 
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
 
 	if (pf->ptp_clock)
 		info->phc_index = ptp_clock_index(pf->ptp_clock);
-	else
-		info->phc_index = -1;
 
 	info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON);
 
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index bc79ba974e49..8a32c225e22c 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -3792,8 +3792,6 @@  ice_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *info)
 		return ethtool_op_get_ts_info(dev, info);
 
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 06b9970dffad..ca6ccbc13954 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -2387,15 +2387,11 @@  static int igb_get_ts_info(struct net_device *dev,
 
 	if (adapter->ptp_clock)
 		info->phc_index = ptp_clock_index(adapter->ptp_clock);
-	else
-		info->phc_index = -1;
 
 	switch (adapter->hw.mac.type) {
 	case e1000_82575:
 		info->so_timestamping =
-			SOF_TIMESTAMPING_TX_SOFTWARE |
-			SOF_TIMESTAMPING_RX_SOFTWARE |
-			SOF_TIMESTAMPING_SOFTWARE;
+			SOF_TIMESTAMPING_TX_SOFTWARE;
 		return 0;
 	case e1000_82576:
 	case e1000_82580:
@@ -2405,8 +2401,6 @@  static int igb_get_ts_info(struct net_device *dev,
 	case e1000_i211:
 		info->so_timestamping =
 			SOF_TIMESTAMPING_TX_SOFTWARE |
-			SOF_TIMESTAMPING_RX_SOFTWARE |
-			SOF_TIMESTAMPING_SOFTWARE |
 			SOF_TIMESTAMPING_TX_HARDWARE |
 			SOF_TIMESTAMPING_RX_HARDWARE |
 			SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c
index 3d3ef4e1547c..fde6f2b3466d 100644
--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
+++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
@@ -1565,15 +1565,11 @@  static int igc_ethtool_get_ts_info(struct net_device *dev,
 
 	if (adapter->ptp_clock)
 		info->phc_index = ptp_clock_index(adapter->ptp_clock);
-	else
-		info->phc_index = -1;
 
 	switch (adapter->hw.mac.type) {
 	case igc_i225:
 		info->so_timestamping =
 			SOF_TIMESTAMPING_TX_SOFTWARE |
-			SOF_TIMESTAMPING_RX_SOFTWARE |
-			SOF_TIMESTAMPING_SOFTWARE |
 			SOF_TIMESTAMPING_TX_HARDWARE |
 			SOF_TIMESTAMPING_RX_HARDWARE |
 			SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index 4cac76254966..9482e0cca8b7 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -3196,16 +3196,12 @@  static int ixgbe_get_ts_info(struct net_device *dev,
 
 	info->so_timestamping =
 		SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
 
 	if (adapter->ptp_clock)
 		info->phc_index = ptp_clock_index(adapter->ptp_clock);
-	else
-		info->phc_index = -1;
 
 	info->tx_types =
 		BIT(HWTSTAMP_TX_OFF) |
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 0d62a33afa80..1f01c6febc6b 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -5268,8 +5268,6 @@  static int mvpp2_ethtool_get_ts_info(struct net_device *dev,
 
 	info->phc_index = mvpp22_tai_ptp_clock_index(port->priv->tai);
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
index 0db62eb0dab3..32468c663605 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
@@ -962,8 +962,6 @@  static int otx2_get_ts_info(struct net_device *netdev,
 		return ethtool_op_get_ts_info(netdev, info);
 
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index f064789f3240..b749879b3daa 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -2784,7 +2784,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,
@@ -2801,7 +2803,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,
@@ -2818,7 +2822,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,
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h
index 769095d4932d..c8aa1452fbb9 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h
@@ -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,
diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c b/drivers/net/ethernet/microchip/lan743x_ethtool.c
index 3a63ec091413..0f1c0edec460 100644
--- a/drivers/net/ethernet/microchip/lan743x_ethtool.c
+++ b/drivers/net/ethernet/microchip/lan743x_ethtool.c
@@ -1034,16 +1034,12 @@  static int lan743x_ethtool_get_ts_info(struct net_device *netdev,
 	struct lan743x_adapter *adapter = netdev_priv(netdev);
 
 	ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				   SOF_TIMESTAMPING_RX_SOFTWARE |
-				   SOF_TIMESTAMPING_SOFTWARE |
 				   SOF_TIMESTAMPING_TX_HARDWARE |
 				   SOF_TIMESTAMPING_RX_HARDWARE |
 				   SOF_TIMESTAMPING_RAW_HARDWARE;
 
 	if (adapter->ptp.ptp_clock)
 		ts_info->phc_index = ptp_clock_index(adapter->ptp.ptp_clock);
-	else
-		ts_info->phc_index = -1;
 
 	ts_info->tx_types = BIT(HWTSTAMP_TX_OFF) |
 			    BIT(HWTSTAMP_TX_ON) |
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c b/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c
index aec7066d83b3..2474dfd330f4 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c
@@ -549,16 +549,13 @@  static int lan966x_get_ts_info(struct net_device *dev,
 
 	phc = &lan966x->phc[LAN966X_PHC_PORT];
 
-	info->phc_index = phc->clock ? ptp_clock_index(phc->clock) : -1;
-	if (info->phc_index == -1) {
-		info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE |
-					 SOF_TIMESTAMPING_RX_SOFTWARE |
-					 SOF_TIMESTAMPING_SOFTWARE;
+	if (phc->clock) {
+		info->phc_index = ptp_clock_index(phc->clock);
+	} else {
+		info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE;
 		return 0;
 	}
 	info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE |
-				 SOF_TIMESTAMPING_RX_SOFTWARE |
-				 SOF_TIMESTAMPING_SOFTWARE |
 				 SOF_TIMESTAMPING_TX_HARDWARE |
 				 SOF_TIMESTAMPING_RX_HARDWARE |
 				 SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c b/drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c
index 4f800c1a435d..d898a7238b48 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c
@@ -1194,16 +1194,13 @@  static int sparx5_get_ts_info(struct net_device *dev,
 
 	phc = &sparx5->phc[SPARX5_PHC_PORT];
 
-	info->phc_index = phc->clock ? ptp_clock_index(phc->clock) : -1;
-	if (info->phc_index == -1) {
-		info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE |
-					 SOF_TIMESTAMPING_RX_SOFTWARE |
-					 SOF_TIMESTAMPING_SOFTWARE;
+	if (phc->clock) {
+		info->phc_index = ptp_clock_index(phc->clock);
+	} else {
+		info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE;
 		return 0;
 	}
 	info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE |
-				 SOF_TIMESTAMPING_RX_SOFTWARE |
-				 SOF_TIMESTAMPING_SOFTWARE |
 				 SOF_TIMESTAMPING_TX_HARDWARE |
 				 SOF_TIMESTAMPING_RX_HARDWARE |
 				 SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/mscc/ocelot_ptp.c b/drivers/net/ethernet/mscc/ocelot_ptp.c
index b3c28260adf8..e172638b0601 100644
--- a/drivers/net/ethernet/mscc/ocelot_ptp.c
+++ b/drivers/net/ethernet/mscc/ocelot_ptp.c
@@ -582,17 +582,13 @@  EXPORT_SYMBOL(ocelot_hwstamp_set);
 int ocelot_get_ts_info(struct ocelot *ocelot, int port,
 		       struct kernel_ethtool_ts_info *info)
 {
-	info->phc_index = ocelot->ptp_clock ?
-			  ptp_clock_index(ocelot->ptp_clock) : -1;
-	if (info->phc_index == -1) {
-		info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE |
-					 SOF_TIMESTAMPING_RX_SOFTWARE |
-					 SOF_TIMESTAMPING_SOFTWARE;
+	if (ocelot->ptp_clock) {
+		info->phc_index = ptp_clock_index(ocelot->ptp_clock);
+	} else {
+		info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE;
 		return 0;
 	}
 	info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE |
-				 SOF_TIMESTAMPING_RX_SOFTWARE |
-				 SOF_TIMESTAMPING_SOFTWARE |
 				 SOF_TIMESTAMPING_TX_HARDWARE |
 				 SOF_TIMESTAMPING_RX_HARDWARE |
 				 SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
index 4619fd74f3e3..dda22fa4448c 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
@@ -989,8 +989,6 @@  static int ionic_get_ts_info(struct net_device *netdev,
 	info->phc_index = ptp_clock_index(lif->phc->ptp);
 
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ptp.c b/drivers/net/ethernet/qlogic/qede/qede_ptp.c
index 63e3dac4d5f7..9d6399a5c780 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ptp.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ptp.c
@@ -326,25 +326,18 @@  int qede_ptp_get_ts_info(struct qede_dev *edev, struct kernel_ethtool_ts_info *i
 	struct qede_ptp *ptp = edev->ptp;
 
 	if (!ptp) {
-		info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-					SOF_TIMESTAMPING_RX_SOFTWARE |
-					SOF_TIMESTAMPING_SOFTWARE;
-		info->phc_index = -1;
+		info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
 
 		return 0;
 	}
 
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
 
 	if (ptp->clock)
 		info->phc_index = ptp_clock_index(ptp->clock);
-	else
-		info->phc_index = -1;
 
 	info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) |
 			   BIT(HWTSTAMP_FILTER_PTP_V1_L4_EVENT) |
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index c02fb296bf7d..c7ec23688d56 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -1744,8 +1744,6 @@  static int ravb_get_ts_info(struct net_device *ndev,
 
 	info->so_timestamping =
 		SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
@@ -1756,6 +1754,8 @@  static int ravb_get_ts_info(struct net_device *ndev,
 		(1 << HWTSTAMP_FILTER_ALL);
 	if (hw_info->gptp || hw_info->ccc_gac)
 		info->phc_index = ptp_clock_index(priv->ptp.clock);
+	else
+		info->phc_index = 0;
 
 	return 0;
 }
diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
index ff50e20856ec..b80aa27a7214 100644
--- a/drivers/net/ethernet/renesas/rswitch.c
+++ b/drivers/net/ethernet/renesas/rswitch.c
@@ -1815,8 +1815,6 @@  static int rswitch_get_ts_info(struct net_device *ndev, struct kernel_ethtool_ts
 
 	info->phc_index = ptp_clock_index(rdev->priv->ptp_priv->clock);
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/renesas/rtsn.c b/drivers/net/ethernet/renesas/rtsn.c
index 0e6cea42f007..f9f63c61d792 100644
--- a/drivers/net/ethernet/renesas/rtsn.c
+++ b/drivers/net/ethernet/renesas/rtsn.c
@@ -1219,8 +1219,6 @@  static int rtsn_get_ts_info(struct net_device *ndev,
 
 	info->phc_index = ptp_clock_index(priv->ptp_priv->clock);
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c
index 7c887160e2ef..314b41d738f2 100644
--- a/drivers/net/ethernet/sfc/ethtool.c
+++ b/drivers/net/ethernet/sfc/ethtool.c
@@ -230,11 +230,6 @@  static int efx_ethtool_get_ts_info(struct net_device *net_dev,
 {
 	struct efx_nic *efx = efx_netdev_priv(net_dev);
 
-	/* Software capabilities */
-	ts_info->so_timestamping = (SOF_TIMESTAMPING_RX_SOFTWARE |
-				    SOF_TIMESTAMPING_SOFTWARE);
-	ts_info->phc_index = -1;
-
 	efx_ptp_get_ts_info(efx, ts_info);
 	return 0;
 }
diff --git a/drivers/net/ethernet/sfc/siena/ethtool.c b/drivers/net/ethernet/sfc/siena/ethtool.c
index 4c182d4edfc2..f4f4df687708 100644
--- a/drivers/net/ethernet/sfc/siena/ethtool.c
+++ b/drivers/net/ethernet/sfc/siena/ethtool.c
@@ -230,11 +230,6 @@  static int efx_ethtool_get_ts_info(struct net_device *net_dev,
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 
-	/* Software capabilities */
-	ts_info->so_timestamping = (SOF_TIMESTAMPING_RX_SOFTWARE |
-				    SOF_TIMESTAMPING_SOFTWARE);
-	ts_info->phc_index = -1;
-
 	efx_siena_ptp_get_ts_info(efx, ts_info);
 	return 0;
 }
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index 7008219fd88d..a7b8407e898c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -1207,13 +1207,13 @@  static int stmmac_get_ts_info(struct net_device *dev,
 
 		info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
 					SOF_TIMESTAMPING_TX_HARDWARE |
-					SOF_TIMESTAMPING_RX_SOFTWARE |
 					SOF_TIMESTAMPING_RX_HARDWARE |
-					SOF_TIMESTAMPING_SOFTWARE |
 					SOF_TIMESTAMPING_RAW_HARDWARE;
 
 		if (priv->ptp_clock)
 			info->phc_index = ptp_clock_index(priv->ptp_clock);
+		else
+			info->phc_index = 0;
 
 		info->tx_types = (1 << HWTSTAMP_TX_OFF) | (1 << HWTSTAMP_TX_ON);
 
diff --git a/drivers/net/ethernet/ti/am65-cpsw-ethtool.c b/drivers/net/ethernet/ti/am65-cpsw-ethtool.c
index b60976947da5..539d5ca82f52 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-ethtool.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-ethtool.c
@@ -714,8 +714,6 @@  static int am65_cpsw_get_ethtool_ts_info(struct net_device *ndev,
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_TX_SOFTWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
 	info->phc_index = am65_cpts_phc_index(common->cpts);
 	info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON);
diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c b/drivers/net/ethernet/ti/cpsw_ethtool.c
index 53ed23d68722..21d55a180ef6 100644
--- a/drivers/net/ethernet/ti/cpsw_ethtool.c
+++ b/drivers/net/ethernet/ti/cpsw_ethtool.c
@@ -725,8 +725,6 @@  int cpsw_get_ts_info(struct net_device *ndev, struct kernel_ethtool_ts_info *inf
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_TX_SOFTWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
 	info->phc_index = cpsw->cpts->phc_index;
 	info->tx_types =
@@ -741,10 +739,7 @@  int cpsw_get_ts_info(struct net_device *ndev, struct kernel_ethtool_ts_info *inf
 int cpsw_get_ts_info(struct net_device *ndev, struct kernel_ethtool_ts_info *info)
 {
 	info->so_timestamping =
-		SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE;
-	info->phc_index = -1;
+		SOF_TIMESTAMPING_TX_SOFTWARE;
 	info->tx_types = 0;
 	info->rx_filters = 0;
 	return 0;
diff --git a/drivers/net/ethernet/ti/icssg/icssg_ethtool.c b/drivers/net/ethernet/ti/icssg/icssg_ethtool.c
index 5688f054cec5..a2df9e527928 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_ethtool.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_ethtool.c
@@ -118,8 +118,6 @@  static int emac_get_ts_info(struct net_device *ndev,
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_TX_SOFTWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
 
 	info->phc_index = icss_iep_get_ptp_clock_idx(emac->iep);
diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c
index d286709ca3b9..63e686f0b119 100644
--- a/drivers/net/ethernet/ti/netcp_ethss.c
+++ b/drivers/net/ethernet/ti/netcp_ethss.c
@@ -2012,8 +2012,6 @@  static int keystone_get_ts_info(struct net_device *ndev,
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_TX_SOFTWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
 	info->phc_index = gbe_intf->gbe_dev->cpts->phc_index;
 	info->tx_types =
@@ -2030,10 +2028,7 @@  static int keystone_get_ts_info(struct net_device *ndev,
 				struct kernel_ethtool_ts_info *info)
 {
 	info->so_timestamping =
-		SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE;
-	info->phc_index = -1;
+		SOF_TIMESTAMPING_TX_SOFTWARE;
 	info->tx_types = 0;
 	info->rx_filters = 0;
 	return 0;
diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index 56df37f8d50a..aef316278eb4 100644
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
@@ -1026,9 +1026,7 @@  static int ixp4xx_get_ts_info(struct net_device *dev,
 
 	if (info->phc_index < 0) {
 		info->so_timestamping =
-			SOF_TIMESTAMPING_TX_SOFTWARE |
-			SOF_TIMESTAMPING_RX_SOFTWARE |
-			SOF_TIMESTAMPING_SOFTWARE;
+			SOF_TIMESTAMPING_TX_SOFTWARE;
 		return 0;
 	}
 	info->so_timestamping =
diff --git a/drivers/ptp/ptp_ines.c b/drivers/ptp/ptp_ines.c
index e6f7d2bf8dde..14a23d3a27f2 100644
--- a/drivers/ptp/ptp_ines.c
+++ b/drivers/ptp/ptp_ines.c
@@ -562,12 +562,8 @@  static int ines_ts_info(struct mii_timestamper *mii_ts,
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_TX_SOFTWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
 
-	info->phc_index = -1;
-
 	info->tx_types =
 		(1 << HWTSTAMP_TX_OFF) |
 		(1 << HWTSTAMP_TX_ON) |