]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
phy: nxp-c45-tja11xx: fix phase offset calculation
authorRadu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Tue, 20 Apr 2021 13:11:33 +0000 (16:11 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Apr 2021 23:58:46 +0000 (16:58 -0700)
Fix phase offset calculation.

Signed-off-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/nxp-c45-tja11xx.c

index 47cacda8836f9d540c9a4c47f52c1a2b5d838446..95307097ebfff545dfb119e4c50376760cbebe36 100644 (file)
@@ -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);
 }