* [Intel-wired-lan] [PATCH net-next v2] igb: Add counter to i21x doublecheck
@ 2021-04-30 12:41 Grzegorz Siwik
2021-06-25 22:34 ` Brelinski, TonyX
0 siblings, 1 reply; 2+ messages in thread
From: Grzegorz Siwik @ 2021-04-30 12:41 UTC (permalink / raw)
To: intel-wired-lan
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>
---
v2: Changed retries counting method
Moved hw_dbg info
---
drivers/net/ethernet/intel/igb/e1000_mac.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igb/e1000_mac.c b/drivers/net/ethernet/intel/igb/e1000_mac.c
index e63ee3c..1277c5c 100644
--- a/drivers/net/ethernet/intel/igb/e1000_mac.c
+++ b/drivers/net/ethernet/intel/igb/e1000_mac.c
@@ -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)
{
+ int failed_cnt = 3;
bool is_failed;
int i;
@@ -502,9 +503,12 @@ static void igb_i21x_hw_doublecheck(struct e1000_hw *hw)
is_failed = true;
array_wr32(E1000_MTA, i, hw->mac.mta_shadow[i]);
wrfl();
- break;
}
}
+ if (is_failed && --failed_cnt <= 0) {
+ hw_dbg("Failed to update MTA_REGISTER, too many retries");
+ break;
+ }
} while (is_failed);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Intel-wired-lan] [PATCH net-next v2] igb: Add counter to i21x doublecheck
2021-04-30 12:41 [Intel-wired-lan] [PATCH net-next v2] igb: Add counter to i21x doublecheck Grzegorz Siwik
@ 2021-06-25 22:34 ` Brelinski, TonyX
0 siblings, 0 replies; 2+ messages in thread
From: Brelinski, TonyX @ 2021-06-25 22:34 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Grzegorz Siwik
> Sent: Friday, April 30, 2021 5:42 AM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Siwik, Grzegorz <grzegorz.siwik@intel.com>
> Subject: [Intel-wired-lan] [PATCH net-next v2] 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>
> ---
> v2: Changed retries counting method
> Moved hw_dbg info
> ---
> drivers/net/ethernet/intel/igb/e1000_mac.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com> (A Contingent Worker at Intel)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-25 22:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 12:41 [Intel-wired-lan] [PATCH net-next v2] igb: Add counter to i21x doublecheck Grzegorz Siwik
2021-06-25 22:34 ` Brelinski, TonyX
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.