From 2f14e4076d2076cbc0273c2d056775212b5450dd Mon Sep 17 00:00:00 2001 From: Greg Rose Date: Wed, 18 Jan 2012 22:13:31 +0000 Subject: [PATCH] --- yaml --- r: 286671 b: refs/heads/master c: 375b27cf5db963e2bc2a34dc5643d0d7ceca1ee2 h: refs/heads/master i: 286669: 7a6ddc9dcb9b76fdf0bbea15c68bfd84d472f744 286667: ebe535e9831877d52e609aaa9e40e346dae69d56 286663: e831e57326c8c2123d2801b442478ae7a33d5ea2 286655: f56ccf531f74dc1b2471f0c73a751a0f482b626c v: v3 --- [refs] | 2 +- .../net/ethernet/intel/ixgbevf/ixgbevf_main.c | 39 ++++++++++--------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index 48644aa11459..e4547bb026ee 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 795be954dcc4a72329c8591aafe5eadb03b264af +refs/heads/master: 375b27cf5db963e2bc2a34dc5643d0d7ceca1ee2 diff --git a/trunk/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/trunk/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 891162d1610c..1cad3b6d2c30 100644 --- a/trunk/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/trunk/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -917,31 +917,34 @@ static irqreturn_t ixgbevf_msix_mbx(int irq, void *data) struct ixgbe_hw *hw = &adapter->hw; u32 eicr; u32 msg; + bool got_ack = false; eicr = IXGBE_READ_REG(hw, IXGBE_VTEICS); IXGBE_WRITE_REG(hw, IXGBE_VTEICR, eicr); - if (!hw->mbx.ops.check_for_ack(hw)) { - /* - * 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. Also - * avoid the read below because the code to read - * the mailbox will also clear the ack bit. This was - * causing lost acks. Just cache the bit and exit - * the IRQ handler. - */ - hw->mbx.v2p_mailbox |= IXGBE_VFMAILBOX_PFACK; - goto out; - } + if (!hw->mbx.ops.check_for_ack(hw)) + got_ack = true; - /* Not an ack interrupt, go ahead and read the message */ - hw->mbx.ops.read(hw, &msg, 1); + 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_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG) + mod_timer(&adapter->watchdog_timer, + round_jiffies(jiffies + 1)); + if (msg & IXGBE_VT_MSGTYPE_NACK) + pr_warn("Last Request of type %2.2x to PF Nacked\n", + msg & 0xFF); + goto out; + } + + /* + * 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; out: return IRQ_HANDLED; }