summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Nadezhdin <anton.nadezhdin@intel.com>2025-05-20 10:42:16 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-15 12:14:10 +0200
commit22d89925e37e1d517b28015e6592c27a5f262088 (patch)
tree99cad49a59738280595e3730f44b09c1f00ec513
parent43a27836ac98412dfda7cc15a053f5f229f7fc25 (diff)
downloadlinux-22d89925e37e1d517b28015e6592c27a5f262088.tar.gz
linux-22d89925e37e1d517b28015e6592c27a5f262088.tar.bz2
linux-22d89925e37e1d517b28015e6592c27a5f262088.zip
ice/ptp: fix crosstimestamp reporting
commit a5a441ae283d54ec329aadc7426991dc32786d52 upstream. Set use_nsecs=true as timestamp is reported in ns. Lack of this result in smaller timestamp error window which cause error during phc2sys execution on E825 NICs: phc2sys[1768.256]: ioctl PTP_SYS_OFFSET_PRECISE: Invalid argument This problem was introduced in the cited commit which omitted setting use_nsecs to true when converting the ice driver to use convert_base_to_cs(). Testing hints (ethX is PF netdev): phc2sys -s ethX -c CLOCK_REALTIME -O 37 -m phc2sys[1769.256]: CLOCK_REALTIME phc offset -5 s0 freq -0 delay 0 Fixes: d4bea547ebb57 ("ice/ptp: Remove convert_art_to_tsc()") Signed-off-by: Anton Nadezhdin <anton.nadezhdin@intel.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com> Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Markus Blöchl <markus@blochl.de>
-rw-r--r--drivers/net/ethernet/intel/ice/ice_ptp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
index 7c6f81beaee4..369c968a0117 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -2226,6 +2226,7 @@ ice_ptp_get_syncdevicetime(ktime_t *device,
hh_ts = ((u64)hh_ts_hi << 32) | hh_ts_lo;
system->cycles = hh_ts;
system->cs_id = CSID_X86_ART;
+ system->use_nsecs = true;
/* Read Device source clock time */
hh_ts_lo = rd32(hw, GLTSYN_HHTIME_L(tmr_idx));
hh_ts_hi = rd32(hw, GLTSYN_HHTIME_H(tmr_idx));