]> Pileus Git - ~andy/linux/commitdiff
ixgbevf: Synch out of tree and in tree mailbox interrupt handlers
authorGreg Rose <gregory.v.rose@intel.com>
Fri, 4 Jan 2013 07:37:20 +0000 (07:37 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 19 Jan 2013 12:28:29 +0000 (04:28 -0800)
The out of tree driver and the in kernel driver should use the same
interrupt handling logic for mailbox interrupts.  The difference in
the handlers was causing dissimilar behavior between the two drivers
complicating debug and trouble shooting.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

index c27d9867e20df125b544745cf79e9513acddd50a..580dfd88418d0c963f2a845c973a96590206143d 100644 (file)
@@ -750,12 +750,35 @@ static void ixgbevf_set_itr(struct ixgbevf_q_vector *q_vector)
 static irqreturn_t ixgbevf_msix_other(int irq, void *data)
 {
        struct ixgbevf_adapter *adapter = data;
+       struct pci_dev *pdev = adapter->pdev;
        struct ixgbe_hw *hw = &adapter->hw;
+       u32 msg;
+       bool got_ack = false;
 
        hw->mac.get_link_status = 1;
+       if (!hw->mbx.ops.check_for_ack(hw))
+               got_ack = true;
 
-       if (!test_bit(__IXGBEVF_DOWN, &adapter->state))
-               mod_timer(&adapter->watchdog_timer, jiffies);
+       if (!hw->mbx.ops.check_for_msg(hw)) {
+               hw->mbx.ops.read(hw, &msg, 1);
+
+               if ((msg & IXGBE_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG)
+                       mod_timer(&adapter->watchdog_timer,
+                                 round_jiffies(jiffies + 1));
+
+               if (msg & IXGBE_VT_MSGTYPE_NACK)
+                       dev_info(&pdev->dev,
+                                "Last Request of type %2.2x to PF Nacked\n",
+                                msg & 0xFF);
+               hw->mbx.v2p_mailbox |= IXGBE_VFMAILBOX_PFSTS;
+       }
+
+       /* checking for the ack clears the PFACK bit.  Place
+        * it back in the v2p_mailbox cache so that anyone
+        * polling for an ack will not miss it
+        */
+       if (got_ack)
+               hw->mbx.v2p_mailbox |= IXGBE_VFMAILBOX_PFACK;
 
        IXGBE_WRITE_REG(hw, IXGBE_VTEIMS, adapter->eims_other);