e1000e: convert .adjfreq to .adjfine
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 21 Jul 2022 21:29:57 +0000 (14:29 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 28 Jul 2022 17:57:06 +0000 (10:57 -0700)
commitabab010f16378c73e14257573bbcbad4378e80c3
treec6c21974c8188f0827ad22b689315c6778e85d80
parentab8e8db27e829bc7077c4db36ed9e3e0c5daeae8
e1000e: convert .adjfreq to .adjfine

The PTP implementation for the e1000e driver uses the older .adjfreq
method. This method takes an adjustment in parts per billion. The newer
.adjfine implementation uses scaled_ppm. The use of scaled_ppm allows for
finer grained adjustments and is preferred over using the older
implementation.

Make use of mul_u64_u64_div_u64 in order to handle possible overflow of the
multiplication used to calculate the desired adjustment to the hardware
increment value.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/e1000e/e1000.h
drivers/net/ethernet/intel/e1000e/netdev.c
drivers/net/ethernet/intel/e1000e/ptp.c