• Jacob Keller's avatar
    i40e: convert .adjfreq to .adjfine · ccd3bf98
    Jacob Keller authored
    The i40e driver currently implements the .adjfreq handler for frequency
    adjustments. This takes the adjustment parameter in parts per billion. The
    PTP core supports .adjfine which provides an adjustment in scaled parts per
    million. This has a higher resolution and can result in more precise
    adjustments for small corrections.
    
    Convert the existing .adjfreq implementation to the newer .adjfine
    implementation. This is trivial since it just requires changing the divisor
    from 1000000000ULL to (1000000ULL << 16) in the mul_u64_u64_div_u64 call.
    
    This improves the precision of the adjustments and gets us one driver
    closer to removing the old .adjfreq support from the kernel.
    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>
    ccd3bf98
i40e_ptp.c 45.2 KB