Commit 27c1151c authored by Yaniv Rosner's avatar Yaniv Rosner Committed by David S. Miller

bnx2x: Handle a rarely missed interrupt

A rare case of no link due to a missed interrupt may occur due to a
race condition between acknowledging the IGU via the BAR and restoring the NIG
interrupt mask via the GRC.
To solve it, we wait for the IGU ack command to finish prior to restoring the
NIG interrupt mask.
Signed-off-by: default avatarYaniv Rosner <>
Signed-off-by: default avatarYuval Mintz <>
Signed-off-by: default avatarEilon Greenstein <>
Signed-off-by: default avatarDavid S. Miller <>
parent b343d002
......@@ -915,6 +915,7 @@ struct bnx2x_common {
#define MAX_IGU_ATTN_ACK_TO 100
/* end of common */
/* port */
......@@ -3588,6 +3588,21 @@ static void bnx2x_attn_int_asserted(struct bnx2x *bp, u32 asserted)
/* now set back the mask */
if (asserted & ATTN_NIG_FOR_FUNC) {
/* Verify that IGU ack through BAR was written before restoring
* NIG mask. This loop should exit after 2-3 iterations max.
if (bp->common.int_block != INT_BLOCK_HC) {
u32 cnt = 0, igu_acked;
do {
igu_acked = REG_RD(bp,
} while (((igu_acked & ATTN_NIG_FOR_FUNC) == 0) &&
(++cnt < MAX_IGU_ATTN_ACK_TO));
if (!igu_acked)
"Failed to verify IGU ack on time\n");
REG_WR(bp, nig_int_mask_addr, nig_mask);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment