Merge tag 'mips_fixes_4.15_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan...
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / lib / clock.c
index fa8aed62b2314a1be9c0ece89ac9b8b29572a7d4..5701f125e99c10afc45fc431bb53a6855cd216cc 100644 (file)
@@ -423,9 +423,13 @@ void mlx5_pps_event(struct mlx5_core_dev *mdev,
 
        switch (clock->ptp_info.pin_config[pin].func) {
        case PTP_PF_EXTTS:
+               ptp_event.index = pin;
+               ptp_event.timestamp = timecounter_cyc2time(&clock->tc,
+                                       be64_to_cpu(eqe->data.pps.time_stamp));
                if (clock->pps_info.enabled) {
                        ptp_event.type = PTP_CLOCK_PPSUSR;
-                       ptp_event.pps_times.ts_real = ns_to_timespec64(eqe->data.pps.time_stamp);
+                       ptp_event.pps_times.ts_real =
+                                       ns_to_timespec64(ptp_event.timestamp);
                } else {
                        ptp_event.type = PTP_CLOCK_EXTTS;
                }