From: Alexander Duyck Date: Wed, 8 Feb 2012 07:49:43 +0000 (+0000) Subject: ixgbe: Correct Adaptive Interrupt Moderation so that it will change values X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~103 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6e5444ba4e5f22f71000b4e2d68bb0da9e20ef0e;p=users%2Fjedix%2Flinux-maple.git ixgbe: Correct Adaptive Interrupt Moderation so that it will change values This change corrects an issue in which Adaptive Interrupt Moderation was not changing values due to the fact that we were performing an and operation on the resultant value that was causing the value to never change from the default 20K interrupts per second. (cherry picked from commit 5d967eb7f84d2761d624d033c2583187b37b56ce) Signed-off-by: Alexander Duyck Tested-by: Stephen Ko Signed-off-by: Jeff Kirsher Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 924ed4ce433a..2a601ddce73c 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -1829,7 +1829,7 @@ void ixgbe_write_eitr(struct ixgbe_q_vector *q_vector) struct ixgbe_adapter *adapter = q_vector->adapter; struct ixgbe_hw *hw = &adapter->hw; int v_idx = q_vector->v_idx; - u32 itr_reg = q_vector->itr; + u32 itr_reg = q_vector->itr & IXGBE_MAX_EITR; switch (adapter->hw.mac.type) { case ixgbe_mac_82598EB: @@ -1881,7 +1881,7 @@ static void ixgbe_set_itr(struct ixgbe_q_vector *q_vector) ((9 * new_itr) + q_vector->itr); /* save the algorithm value here */ - q_vector->itr = new_itr & IXGBE_MAX_EITR; + q_vector->itr = new_itr; ixgbe_write_eitr(q_vector); }