Commit 1abefdca authored by Jacob Keller's avatar Jacob Keller Committed by Paolo Abeni

ice: rename ice_ptp_tx_cfg_intr

The ice_ptp_tx_cfg_intr() function sends a control queue message to
configure the PHY timestamp interrupt block. This is a very similar name
to a function which is used to configure the MAC Other Interrupt Cause
Enable register.

Rename this function to ice_ptp_cfg_phy_interrupt in order to make it
more obvious to the reader what action it performs, and distinguish it
from other similarly named functions.
Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: default avatarKarol Kolacinski <karol.kolacinski@intel.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent fea82915
...@@ -1455,14 +1455,14 @@ void ice_ptp_link_change(struct ice_pf *pf, u8 port, bool linkup) ...@@ -1455,14 +1455,14 @@ void ice_ptp_link_change(struct ice_pf *pf, u8 port, bool linkup)
} }
/** /**
* ice_ptp_tx_ena_intr - Enable or disable the Tx timestamp interrupt * ice_ptp_cfg_phy_interrupt - Configure PHY interrupt settings
* @pf: PF private structure * @pf: PF private structure
* @ena: bool value to enable or disable interrupt * @ena: bool value to enable or disable interrupt
* @threshold: Minimum number of packets at which intr is triggered * @threshold: Minimum number of packets at which intr is triggered
* *
* Utility function to enable or disable Tx timestamp interrupt and threshold * Utility function to enable or disable Tx timestamp interrupt and threshold
*/ */
static int ice_ptp_tx_ena_intr(struct ice_pf *pf, bool ena, u32 threshold) static int ice_ptp_cfg_phy_interrupt(struct ice_pf *pf, bool ena, u32 threshold)
{ {
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int err = 0; int err = 0;
...@@ -2674,8 +2674,8 @@ void ice_ptp_reset(struct ice_pf *pf, enum ice_reset_req reset_type) ...@@ -2674,8 +2674,8 @@ void ice_ptp_reset(struct ice_pf *pf, enum ice_reset_req reset_type)
struct ice_ptp *ptp = &pf->ptp; struct ice_ptp *ptp = &pf->ptp;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
struct timespec64 ts; struct timespec64 ts;
int err, itr = 1;
u64 time_diff; u64 time_diff;
int err;
if (ptp->state == ICE_PTP_READY) { if (ptp->state == ICE_PTP_READY) {
ice_ptp_prepare_for_reset(pf, reset_type); ice_ptp_prepare_for_reset(pf, reset_type);
...@@ -2726,7 +2726,7 @@ void ice_ptp_reset(struct ice_pf *pf, enum ice_reset_req reset_type) ...@@ -2726,7 +2726,7 @@ void ice_ptp_reset(struct ice_pf *pf, enum ice_reset_req reset_type)
if (!ice_is_e810(hw)) { if (!ice_is_e810(hw)) {
/* Enable quad interrupts */ /* Enable quad interrupts */
err = ice_ptp_tx_ena_intr(pf, true, itr); err = ice_ptp_cfg_phy_interrupt(pf, true, 1);
if (err) if (err)
goto err; goto err;
} }
...@@ -2979,7 +2979,7 @@ static int ice_ptp_init_owner(struct ice_pf *pf) ...@@ -2979,7 +2979,7 @@ static int ice_ptp_init_owner(struct ice_pf *pf)
{ {
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
struct timespec64 ts; struct timespec64 ts;
int err, itr = 1; int err;
err = ice_ptp_init_phc(hw); err = ice_ptp_init_phc(hw);
if (err) { if (err) {
...@@ -3014,7 +3014,7 @@ static int ice_ptp_init_owner(struct ice_pf *pf) ...@@ -3014,7 +3014,7 @@ static int ice_ptp_init_owner(struct ice_pf *pf)
if (!ice_is_e810(hw)) { if (!ice_is_e810(hw)) {
/* Enable quad interrupts */ /* Enable quad interrupts */
err = ice_ptp_tx_ena_intr(pf, true, itr); err = ice_ptp_cfg_phy_interrupt(pf, true, 1);
if (err) if (err)
goto err_exit; goto err_exit;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment