aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Skidmore <donald.c.skidmore@intel.com>2013-10-01 07:33:49 -0400
committerDavid S. Miller <davem@davemloft.net>2013-10-01 12:49:48 -0400
commitc7bb417dbb8888cfd20824d54f9af9c92b9ff43d (patch)
treed903a9a8738af296c6560c1e2e181f21de05ff2e
parentfa07f10d9dfc18c9aa285947c3a557e30f78c275 (diff)
ixgbevf: cleanup redundant mailbox read failure check
Since we are already checking for read failure in check_link we don't need to do it here. Instead just make sure the watchdog task gets scheduled, if we are up, and it can be done there. This will better follow igbvf method of handling a mailbox event and message timeout. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 59a62bbfb371..b9a78a2d486d 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -756,37 +756,12 @@ static void ixgbevf_set_itr(struct ixgbevf_q_vector *q_vector)
756static irqreturn_t ixgbevf_msix_other(int irq, void *data) 756static irqreturn_t ixgbevf_msix_other(int irq, void *data)
757{ 757{
758 struct ixgbevf_adapter *adapter = data; 758 struct ixgbevf_adapter *adapter = data;
759 struct pci_dev *pdev = adapter->pdev;
760 struct ixgbe_hw *hw = &adapter->hw; 759 struct ixgbe_hw *hw = &adapter->hw;
761 u32 msg;
762 bool got_ack = false;
763 760
764 hw->mac.get_link_status = 1; 761 hw->mac.get_link_status = 1;
765 if (!hw->mbx.ops.check_for_ack(hw))
766 got_ack = true;
767
768 if (!hw->mbx.ops.check_for_msg(hw)) {
769 hw->mbx.ops.read(hw, &msg, 1);
770 762
771 if ((msg & IXGBE_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG) { 763 if (!test_bit(__IXGBEVF_DOWN, &adapter->state))
772 mod_timer(&adapter->watchdog_timer, 764 mod_timer(&adapter->watchdog_timer, jiffies);
773 round_jiffies(jiffies + 1));
774 adapter->link_up = false;
775 }
776
777 if (msg & IXGBE_VT_MSGTYPE_NACK)
778 dev_info(&pdev->dev,
779 "Last Request of type %2.2x to PF Nacked\n",
780 msg & 0xFF);
781 hw->mbx.v2p_mailbox |= IXGBE_VFMAILBOX_PFSTS;
782 }
783
784 /* checking for the ack clears the PFACK bit. Place
785 * it back in the v2p_mailbox cache so that anyone
786 * polling for an ack will not miss it
787 */
788 if (got_ack)
789 hw->mbx.v2p_mailbox |= IXGBE_VFMAILBOX_PFACK;
790 765
791 IXGBE_WRITE_REG(hw, IXGBE_VTEIMS, adapter->eims_other); 766 IXGBE_WRITE_REG(hw, IXGBE_VTEIMS, adapter->eims_other);
792 767