summaryrefslogtreecommitdiff
path: root/scripts/Makefile.modbuiltin
diff options
context:
space:
mode:
authorAriel Levkovich <lariel@mellanox.com>2018-06-25 19:12:02 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-28 08:49:11 +0300
commitadcecd4ab150f4e2dfdb2fcbf3f1394de6f9dd7a (patch)
tree013fda0475d84ffdbb9b487552b57aefe751e819 /scripts/Makefile.modbuiltin
parente2ffdd646cf61ae1444d376d1ea1e756a495eff8 (diff)
downloadlinux-adcecd4ab150f4e2dfdb2fcbf3f1394de6f9dd7a.tar.xz
net/mlx5: Adjust clock overflow work period
[ Upstream commit 33180bee86a8940a84950edca46315cd9dd6deb5 ] When driver converts HW timestamp to wall clock time it subtracts the last saved cycle counter from the HW timestamp and converts the difference to nanoseconds. The conversion is done by multiplying the cycles difference with the clock multiplier value as a first step and therefore the cycles difference should be small enough so that the multiplication product doesn't exceed 64bit. The overflow handling routine is in charge of updating the last saved cycle counter in driver and it is called periodically using kernel delayed workqueue. The delay period for this work is calculated using the max HW cycle counter value (a 41 bit mask) as a base which doesn't take the 64bit limit into account so the delay period may be incorrect and too long to prevent a large difference between the HW counter and the last saved counter in SW. This change adjusts the work period for the HW clock overflow work by taking the minimum between the previous value and the quotient of max u64 value and the clock multiplier value. Fixes: ef9814deafd0 ("net/mlx5e: Add HW timestamping (TS) support") Signed-off-by: Ariel Levkovich <lariel@mellanox.com> Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/Makefile.modbuiltin')
0 files changed, 0 insertions, 0 deletions