• Jacob Keller's avatar
    ice: exit bypass mode once hardware finishes timestamp calibration · a69f1cb6
    Jacob Keller authored
    Once the E822 device has sent and received one packet, the hardware
    computes the internal delay of the PHY using a process known as Vernier
    calibration. This calibration calculates a more accurate offset for the
    Tx and Rx timestamps. To make use of this offset, we need to exit the
    bypass mode. This cannot be done until the PHY has completed offset
    calibration, as indicated by the offset valid bits.
    
    To handle this, introduce a kthread work item which will poll the offset
    valid bits every few milliseconds seeing if it is safe to exit bypass
    mode.
    
    Once we have finished calibrating the offsets, we can program the total
    Tx and Rx offset registers and turn off the bypass bit. This allows the
    hardware to include the more precise vernier calibration offset, and
    improves the timestamp precision.
    Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Tested-by: default avatarGurucharan G <gurucharanx.g@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    a69f1cb6
ice_ptp_hw.h 13.8 KB