i40evf: invite vector 0 to the interrupt party
authorMitch Williams <mitch.a.williams@intel.com>
Wed, 4 Jun 2014 08:45:19 +0000 (08:45 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 3 Jul 2014 02:02:19 +0000 (19:02 -0700)
The i40evf_irq_enable and i40evf_fire_sw_interrupt functions were
unfairly discriminating against MSI-X vector 0, just because it doesn't
handle traffic. That doesn't mean it's not essential to the operation of
the driver. This change allows the watchdog to fire vector 0 via
software, which makes the driver tolerant of dropped interrupts on that
vector.

Buck up, vector 0! You can be part of our gang!

Change-ID: I37131d955018a6b3e711e1732d21428acd0d767e
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40evf/i40evf_main.c

index 5f29e58bf5ea18b3ee24e048455b192d47962f68..6186149a279e94832e5ef072b5f5f30ce8fe0131 100644 (file)
@@ -260,6 +260,12 @@ static void i40evf_fire_sw_int(struct i40evf_adapter *adapter,
        int i;
        uint32_t dyn_ctl;
 
+       if (mask & 1) {
+               dyn_ctl = rd32(hw, I40E_VFINT_DYN_CTL01);
+               dyn_ctl |= I40E_VFINT_DYN_CTLN_SWINT_TRIG_MASK |
+                          I40E_VFINT_DYN_CTLN_CLEARPBA_MASK;
+               wr32(hw, I40E_VFINT_DYN_CTL01, dyn_ctl);
+       }
        for (i = 1; i < adapter->num_msix_vectors; i++) {
                if (mask & (1 << i)) {
                        dyn_ctl = rd32(hw, I40E_VFINT_DYN_CTLN1(i - 1));
@@ -278,6 +284,7 @@ void i40evf_irq_enable(struct i40evf_adapter *adapter, bool flush)
 {
        struct i40e_hw *hw = &adapter->hw;
 
+       i40evf_misc_irq_enable(adapter);
        i40evf_irq_enable_queues(adapter, ~0);
 
        if (flush)