From: Radu Pirea (NXP OSS) Date: Tue, 20 Apr 2021 13:11:33 +0000 (+0300) Subject: phy: nxp-c45-tja11xx: fix phase offset calculation X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6b3a63100dedfa1f0887eb316110d5d7b0c51ed4;p=linux.git phy: nxp-c45-tja11xx: fix phase offset calculation Fix phase offset calculation. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/nxp-c45-tja11xx.c b/drivers/net/phy/nxp-c45-tja11xx.c index 47cacda8836f9..95307097ebfff 100644 --- a/drivers/net/phy/nxp-c45-tja11xx.c +++ b/drivers/net/phy/nxp-c45-tja11xx.c @@ -354,7 +354,7 @@ static u64 nxp_c45_get_phase_shift(u64 phase_offset_raw) * and get 1 decimal point precision. */ phase_offset_raw *= 10; - phase_offset_raw -= phase_offset_raw; + phase_offset_raw -= 738; return div_u64(phase_offset_raw, 9); }