• Jacob Keller's avatar
    igb: convert .adjfreq to .adjfine · d8fae250
    Jacob Keller authored
    The 82576 PTP implementation still uses .adjfreq instead of using the newer
    .adjfine.
    
    This implementation uses a pre-simplified calculation since the base
    increment value for the 82576 is just 16 * 2^19. Converting this into
    scaled_ppm is tricky, and makes the intent a bit less clear.
    
    Simply convert to the normal flow of multiplying the base increment value
    by the scaled_ppm and then dividing by 1000000ULL << 16. This can be
    implemented using mul_u64_u64_div_u64 which can avoid the possible overflow
    that might occur for large adjustments.
    
    Use of .adjfine can improve the precision of small adjustments and gets us
    one driver closer to removing the old implementation from the kernel
    entirely.
    Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    d8fae250
igb_ptp.c 42.3 KB