]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: convert .adjfreq to .adjfine
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 21 Jul 2022 21:29:59 +0000 (14:29 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 28 Jul 2022 17:59:38 +0000 (10:59 -0700)
commitadb8b9a38b6120989233e08ce4ea494c442d736f
tree59723de8a1539b5e4afd34ef3772130582d8c0f3
parentf1d0c3f0992d5c893777e35bb9d62d2a73ea2251
i40e: convert .adjfreq to .adjfine

The i40e driver currently implements the .adjfreq handler for frequency
adjustments. This takes the adjustment parameter in parts per billion. The
PTP core supports .adjfine which provides an adjustment in scaled parts per
million. This has a higher resolution and can result in more precise
adjustments for small corrections.

Convert the existing .adjfreq implementation to the newer .adjfine
implementation. This is trivial since it just requires changing the divisor
from 1000000000ULL to (1000000ULL << 16) in the mul_u64_u64_div_u64 call.

This improves the precision of the adjustments and gets us one driver
closer to removing the old .adjfreq support from the kernel.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ptp.c