Skip to content

Commit

Permalink
ixgbe: balance free_irq calls with request_irq calls
Browse files Browse the repository at this point in the history
We were incorrectly freeing IRQs that we had not requested.  This change
corrects that by making certain we only free q_vectors that we have
requested IRQs for.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Mar 3, 2011
1 parent dbf893e commit 894ff7c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2597,6 +2597,11 @@ static void ixgbe_free_irq(struct ixgbe_adapter *adapter)

i--;
for (; i >= 0; i--) {
/* free only the irqs that were actually requested */
if (!adapter->q_vector[i]->rxr_count &&
!adapter->q_vector[i]->txr_count)
continue;

free_irq(adapter->msix_entries[i].vector,
adapter->q_vector[i]);
}
Expand Down

0 comments on commit 894ff7c

Please sign in to comment.