net/mlx5: Don't call timecounter cyc2time directly from 1PPS flow
authorEran Ben Elisha <eranbe@mellanox.com>
Tue, 16 Jun 2020 09:07:10 +0000 (12:07 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 15 Sep 2020 18:59:50 +0000 (11:59 -0700)
commit0d2ffdc8d4002a62de31ff7aa3bef28c843c3cbe
treece2608efa6400d0731adaca921e538fbde6e3d92
parent87f3495cbe8d1d34ce430b11b1ea34e69e6f4126
net/mlx5: Don't call timecounter cyc2time directly from 1PPS flow

Before calling timecounter_cyc2time(), clock->lock must be taken.
Use mlx5_timecounter_cyc2time instead which guarantees a safe access.

Fixes: afc98a0b46d8 ("net/mlx5: Update ptp_clock_event foreach PPS event")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c