提交 1d3cb90c 编写于 作者: G Grzegorz Siwik 提交者: Tony Nguyen

igb: Add double-check MTA_REGISTER for i210 and i211

Add new function which checks MTA_REGISTER if its filled correctly.
If not then writes again to same register.
There is possibility that i210 and i211 could not accept
MTA_REGISTER settings, specially when you add and remove
many of multicast addresses in short time.
Without this patch there is possibility that multicast settings will be
not always set correctly in hardware.
Signed-off-by: NGrzegorz Siwik <grzegorz.siwik@intel.com>
Tested-by: NDave Switzer <david.switzer@intel.com>
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
上级 26b67f5a
...@@ -483,6 +483,31 @@ static u32 igb_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr) ...@@ -483,6 +483,31 @@ static u32 igb_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr)
return hash_value; return hash_value;
} }
/**
* igb_i21x_hw_doublecheck - double checks potential HW issue in i21X
* @hw: pointer to the HW structure
*
* Checks if multicast array is wrote correctly
* If not then rewrites again to register
**/
static void igb_i21x_hw_doublecheck(struct e1000_hw *hw)
{
bool is_failed;
int i;
do {
is_failed = false;
for (i = hw->mac.mta_reg_count - 1; i >= 0; i--) {
if (array_rd32(E1000_MTA, i) != hw->mac.mta_shadow[i]) {
is_failed = true;
array_wr32(E1000_MTA, i, hw->mac.mta_shadow[i]);
wrfl();
break;
}
}
} while (is_failed);
}
/** /**
* igb_update_mc_addr_list - Update Multicast addresses * igb_update_mc_addr_list - Update Multicast addresses
* @hw: pointer to the HW structure * @hw: pointer to the HW structure
...@@ -516,6 +541,8 @@ void igb_update_mc_addr_list(struct e1000_hw *hw, ...@@ -516,6 +541,8 @@ void igb_update_mc_addr_list(struct e1000_hw *hw,
for (i = hw->mac.mta_reg_count - 1; i >= 0; i--) for (i = hw->mac.mta_reg_count - 1; i >= 0; i--)
array_wr32(E1000_MTA, i, hw->mac.mta_shadow[i]); array_wr32(E1000_MTA, i, hw->mac.mta_shadow[i]);
wrfl(); wrfl();
if (hw->mac.type == e1000_i210 || hw->mac.type == e1000_i211)
igb_i21x_hw_doublecheck(hw);
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册