]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Use div64_u64 instead of div_u64 in adjfine
authorKarol Kolacinski <karol.kolacinski@intel.com>
Thu, 4 Nov 2021 13:52:11 +0000 (14:52 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 14 Dec 2021 19:29:34 +0000 (11:29 -0800)
commit24c9c1aceedccb8c336bd7688472018c80d12ad6
tree460d107a42b4f5626c81c1425ff351f382adc999
parentb8b633b583f983f0d10750e349f3ad209d13a048
ice: Use div64_u64 instead of div_u64 in adjfine

Change the division in ice_ptp_adjfine from div_u64 to div64_u64.
div_u64 is used when the divisor is 32 bit but in this case incval is
64 bit and it caused incorrect calculations and incval adjustments.

Fixes: 6e97854adf8d ("ice: register 1588 PTP clock device object for E810 devices")
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_ptp.c