• Jacob Keller's avatar
    ice: always call ice_ptp_link_change and make it void · 6b1ff5d3
    Jacob Keller authored
    The ice_ptp_link_change function is currently only called for E822 based
    hardware. Future changes are going to extend this function to perform
    additional tasks on link change.
    
    Always call this function, moving the E810 check from the callers down to
    just before we call the E822-specific function required to restart the PHY.
    
    This function also returns an error value, but none of the callers actually
    check it. In general, the errors it produces are more likely systemic
    problems such as invalid or corrupt port numbers. No caller checks these,
    and so no warning is logged.
    
    Re-order the flag checks so that ICE_FLAG_PTP is checked first. Drop the
    unnecessary check for ICE_FLAG_PTP_SUPPORTED, as ICE_FLAG_PTP will not be
    set except when ICE_FLAG_PTP_SUPPORTED is set.
    
    Convert the port checks to WARN_ON_ONCE, in order to generate a kernel
    stack trace when they are hit.
    
    Convert the function to void since no caller actually checks these return
    values.
    Co-developed-by: default avatarDave Ertman <david.m.ertman@intel.com>
    Signed-off-by: default avatarDave Ertman <david.m.ertman@intel.com>
    Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    6b1ff5d3
ice_ptp.c 72.8 KB