]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:49:26 +0000 (09:49 +0100)
commitcb7904d9110f1b0d631d2462f84176dae8c8d8a1
tree00b5375580310069b7315e7e5276e63e21d04192
parentc2412325c9830d8a23ed36b4ec53d792f112746d
ice: Use div64_u64 instead of div_u64 in adjfine

BugLink: https://bugs.launchpad.net/bugs/1956302
[ Upstream commit 0013881c1145d36bf26165bb70fdd7560a5507a3 ]

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: 06c16d89d2cb ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/net/ethernet/intel/ice/ice_ptp.c