Skip to content

Commit 52eeeb4

Browse files
anadezhdmehmetb0
authored andcommitted
ice/ptp: fix crosstimestamp reporting
BugLink: https://bugs.launchpad.net/bugs/2119603 [ Upstream commit a5a441ae283d54ec329aadc7426991dc32786d52 ] 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: d4bea54 ("ice/ptp: Remove convert_art_to_tsc()") Signed-off-by: Anton Nadezhdin <[email protected]> Reviewed-by: Aleksandr Loktionov <[email protected]> Reviewed-by: Arkadiusz Kubalewski <[email protected]> Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Manuel Diewald <[email protected]> Signed-off-by: Mehmet Basaran <[email protected]>
1 parent 61c113b commit 52eeeb4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/intel/ice/ice_ptp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,6 +2243,7 @@ ice_ptp_get_syncdevicetime(ktime_t *device,
22432243
hh_ts = ((u64)hh_ts_hi << 32) | hh_ts_lo;
22442244
system->cycles = hh_ts;
22452245
system->cs_id = CSID_X86_ART;
2246+
system->use_nsecs = true;
22462247
/* Read Device source clock time */
22472248
hh_ts_lo = rd32(hw, GLTSYN_HHTIME_L(tmr_idx));
22482249
hh_ts_hi = rd32(hw, GLTSYN_HHTIME_H(tmr_idx));

0 commit comments

Comments
 (0)