mirror of https://gitee.com/openkylin/linux.git
i40e/i40evf: fix accidental write to ITR registers
Fix a bug introduced in the force writeback code, where the interrupt rate was set to 0 (maximum) by accident. The driver must correctly set the NOITR fields to avoid ITR update as a side effect of triggering the software interrupt. Change-ID: I290851ae04ef3811c43aab5ee33242029f26c1a3 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
3c8e0b989a
commit
97bf75f169
|
@ -859,6 +859,7 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)
|
|||
static void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector)
|
||||
{
|
||||
u32 val = I40E_PFINT_DYN_CTLN_INTENA_MASK |
|
||||
I40E_PFINT_DYN_CTLN_ITR_INDX_MASK | /* set noitr */
|
||||
I40E_PFINT_DYN_CTLN_SWINT_TRIG_MASK |
|
||||
I40E_PFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK;
|
||||
/* allow 00 to be written to the index */
|
||||
|
|
|
@ -371,6 +371,7 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)
|
|||
static void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector)
|
||||
{
|
||||
u32 val = I40E_VFINT_DYN_CTLN_INTENA_MASK |
|
||||
I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK | /* set noitr */
|
||||
I40E_VFINT_DYN_CTLN_SWINT_TRIG_MASK |
|
||||
I40E_VFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK;
|
||||
/* allow 00 to be written to the index */
|
||||
|
|
|
@ -244,6 +244,7 @@ void i40evf_irq_enable_queues(struct i40evf_adapter *adapter, u32 mask)
|
|||
if (mask & (1 << (i - 1))) {
|
||||
wr32(hw, I40E_VFINT_DYN_CTLN1(i - 1),
|
||||
I40E_VFINT_DYN_CTLN1_INTENA_MASK |
|
||||
I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK |
|
||||
I40E_VFINT_DYN_CTLN_CLEARPBA_MASK);
|
||||
}
|
||||
}
|
||||
|
@ -263,6 +264,7 @@ static void i40evf_fire_sw_int(struct i40evf_adapter *adapter, u32 mask)
|
|||
if (mask & 1) {
|
||||
dyn_ctl = rd32(hw, I40E_VFINT_DYN_CTL01);
|
||||
dyn_ctl |= I40E_VFINT_DYN_CTLN_SWINT_TRIG_MASK |
|
||||
I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK |
|
||||
I40E_VFINT_DYN_CTLN_CLEARPBA_MASK;
|
||||
wr32(hw, I40E_VFINT_DYN_CTL01, dyn_ctl);
|
||||
}
|
||||
|
@ -270,6 +272,7 @@ static void i40evf_fire_sw_int(struct i40evf_adapter *adapter, u32 mask)
|
|||
if (mask & (1 << i)) {
|
||||
dyn_ctl = rd32(hw, I40E_VFINT_DYN_CTLN1(i - 1));
|
||||
dyn_ctl |= I40E_VFINT_DYN_CTLN_SWINT_TRIG_MASK |
|
||||
I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK |
|
||||
I40E_VFINT_DYN_CTLN_CLEARPBA_MASK;
|
||||
wr32(hw, I40E_VFINT_DYN_CTLN1(i - 1), dyn_ctl);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue