aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2010-05-05 15:57:49 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-06 03:31:45 -0400
commit08259594e047170923ef11d1482648642bfe606f (patch)
tree467b904e16abbc8f5a634a4178a680cc9abada48
parent8a07a22d856f37e580557c1a13c8eb8662f9cc11 (diff)
ixgbevf: Cache PF ack bit in interrupt
When the PF acks a message from the VF the VF gets an interrupt. It must cache the ack bit so that polling SW will not miss the ack. Also avoid reading the message buffer on acks because that also will clear the ack bit. Signed-off-by: Greg Rose <gregory.v.rose@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/ixgbevf/ixgbevf_main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c
index 08707402eb18..460c37fee965 100644
--- a/drivers/net/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ixgbevf/ixgbevf_main.c
@@ -961,12 +961,28 @@ static irqreturn_t ixgbevf_msix_mbx(int irq, void *data)
961 eicr = IXGBE_READ_REG(hw, IXGBE_VTEICS); 961 eicr = IXGBE_READ_REG(hw, IXGBE_VTEICS);
962 IXGBE_WRITE_REG(hw, IXGBE_VTEICR, eicr); 962 IXGBE_WRITE_REG(hw, IXGBE_VTEICR, eicr);
963 963
964 if (!hw->mbx.ops.check_for_ack(hw)) {
965 /*
966 * checking for the ack clears the PFACK bit. Place
967 * it back in the v2p_mailbox cache so that anyone
968 * polling for an ack will not miss it. Also
969 * avoid the read below because the code to read
970 * the mailbox will also clear the ack bit. This was
971 * causing lost acks. Just cache the bit and exit
972 * the IRQ handler.
973 */
974 hw->mbx.v2p_mailbox |= IXGBE_VFMAILBOX_PFACK;
975 goto out;
976 }
977
978 /* Not an ack interrupt, go ahead and read the message */
964 hw->mbx.ops.read(hw, &msg, 1); 979 hw->mbx.ops.read(hw, &msg, 1);
965 980
966 if ((msg & IXGBE_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG) 981 if ((msg & IXGBE_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG)
967 mod_timer(&adapter->watchdog_timer, 982 mod_timer(&adapter->watchdog_timer,
968 round_jiffies(jiffies + 1)); 983 round_jiffies(jiffies + 1));
969 984
985out:
970 return IRQ_HANDLED; 986 return IRQ_HANDLED;
971} 987}
972 988