aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnjali Singhai Jain <anjali.singhai@intel.com>2014-06-03 19:50:14 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-06-19 23:22:03 -0400
commit70114ec4aa38096253eef8a9379a59d129e90902 (patch)
tree93df68864f6dd871c1fa393ceacf597bfbfc7f08
parent80a977e79373c8e46d88800a4e2c0cfeeb8d925b (diff)
i40e: Fix dangling ring pointers upon driver removal
When we resize the number of queues, the driver needs to disassociate any qvectors that are no longer in use from the original rings, this way we do not try to access the rings through these qvectors at the time of freeing the qvectors. Change-ID: Ie4eb9fc749f8e12348517fe1560f599c58f4a2a4 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 95c331abee43..7d2aeeb6318f 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -3151,8 +3151,12 @@ static void i40e_vsi_map_rings_to_vectors(struct i40e_vsi *vsi)
3151 3151
3152 /* If we don't have enough vectors for a 1-to-1 mapping, we'll have to 3152 /* If we don't have enough vectors for a 1-to-1 mapping, we'll have to
3153 * group them so there are multiple queues per vector. 3153 * group them so there are multiple queues per vector.
3154 * It is also important to go through all the vectors available to be
3155 * sure that if we don't use all the vectors, that the remaining vectors
3156 * are cleared. This is especially important when decreasing the
3157 * number of queues in use.
3154 */ 3158 */
3155 for (; v_start < q_vectors && qp_remaining; v_start++) { 3159 for (; v_start < q_vectors; v_start++) {
3156 struct i40e_q_vector *q_vector = vsi->q_vectors[v_start]; 3160 struct i40e_q_vector *q_vector = vsi->q_vectors[v_start];
3157 3161
3158 num_ringpairs = DIV_ROUND_UP(qp_remaining, q_vectors - v_start); 3162 num_ringpairs = DIV_ROUND_UP(qp_remaining, q_vectors - v_start);