mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
igb: Add counter to i21x doublecheck
Add failed_counter to i21x_doublecheck(). There is possibility that loop will never end. With this patch the loop will stop after maximum 3 retries to write to MTA_REGISTER Signed-off-by: Grzegorz Siwik <grzegorz.siwik@intel.com> Tested-by: Tony Brelinski <tonyx.brelinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
356ae88f83
commit
07be39e32d
1 changed files with 5 additions and 1 deletions
|
@ -492,6 +492,7 @@ static u32 igb_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr)
|
||||||
**/
|
**/
|
||||||
static void igb_i21x_hw_doublecheck(struct e1000_hw *hw)
|
static void igb_i21x_hw_doublecheck(struct e1000_hw *hw)
|
||||||
{
|
{
|
||||||
|
int failed_cnt = 3;
|
||||||
bool is_failed;
|
bool is_failed;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -502,9 +503,12 @@ static void igb_i21x_hw_doublecheck(struct e1000_hw *hw)
|
||||||
is_failed = true;
|
is_failed = true;
|
||||||
array_wr32(E1000_MTA, i, hw->mac.mta_shadow[i]);
|
array_wr32(E1000_MTA, i, hw->mac.mta_shadow[i]);
|
||||||
wrfl();
|
wrfl();
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (is_failed && --failed_cnt <= 0) {
|
||||||
|
hw_dbg("Failed to update MTA_REGISTER, too many retries");
|
||||||
|
break;
|
||||||
|
}
|
||||||
} while (is_failed);
|
} while (is_failed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue