]> 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)
commitb753a9dad2d53de31bcb197b82d718c49c98fba0
tree460d107a42b4f5626c81c1425ff351f382adc999
parentad48478bec528fd4d01ed1ab2467b485807577fd
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: 40b7ff849b7a ("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