mlx5: extend PTP gettime function to read system clock
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 3 Dec 2018 12:59:42 +0000 (13:59 +0100)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 20 Dec 2018 13:06:00 +0000 (05:06 -0800)
commit4a0475d57ad134429f9bb56068bb738b4afc5992
tree732560128a19a73aacdab980e52bed3d473a5a34
parent5d8678365c90b9ce1fd2243ff5ea562609f6cec1
mlx5: extend PTP gettime function to read system clock

Read the system time right before and immediately after reading the low
register of the internal timer. This adds support for the
PTP_SYS_OFFSET_EXTENDED ioctl.

Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h