From: Roy Franz <redacted>
SDP representors do not support hardware timestamping. The current
implementation of otx2_get_ts_info incorrectly advertises hardware
timestamping capabilities and a PHC index to userspace for these
interfaces.
Fix this by checking if the device is an SDP representor and returning
the default software timestamping capabilities instead.
Fixes: 2f7f33a09516 ("octeontx2-pf: Add representors for sdp MAC")
Signed-off-by: Nitin Shetty J <redacted>
Signed-off-by: Roy Franz <redacted>
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
index a0340f3422bf..f7a2202c4a3e 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
@@ -978,7 +978,7 @@ static int otx2_get_ts_info(struct net_device *netdev,
{
struct otx2_nic *pfvf = netdev_priv(netdev);
- if (!pfvf->ptp)
+ if (!pfvf->ptp || is_otx2_sdp_rep(pfvf->pdev))
return ethtool_op_get_ts_info(netdev, info);
info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |--
2.48.1