• Jacob Keller's avatar
    ice: PTP: move setting of tstamp_config · e59d75dd
    Jacob Keller authored
    The tstamp_config structure is being set inside of
    ice_ptp_cfg_timestamp, which is the function used to set Tx and
    Rx timestamping during initialization.
    
    This function is also used in order to set the PHY port timestamping
    status. However, it makes sense to always set the tstamp_config directly
    whenever the ice_set_tx_tstamp or ice_set_rx_tstamp functions are
    called.
    
    Move assignment of tstamp_config into the related functions and out of
    ice_ptp_cfg_timestamp.
    
    Now that we assign the timestamp mode in the relevant functions, we no
    longer modify the config value in ice_set_timestamp_mode. In turn, we
    no longer want to copy that config value into the PF cached structure.
    Instead, this is now the source of truth for actual configuration. On
    success of ice_set_timestamp_mode, copy the real configured mode back to
    report it out to userspace.
    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>
    e59d75dd
ice_ptp.c 56 KB