Skip to content

Commit

Permalink
tg3: Fix missed MSI workaround
Browse files Browse the repository at this point in the history
This patch fixes a minor counter initialization bug and makes the MSI
workaround slightly more efficient by attempting to service pending
interrupts before applying the workaround.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Matt Carlson authored and David S. Miller committed Sep 15, 2011
1 parent b99d2a5 commit 7f23073
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -8105,7 +8105,7 @@ static void tg3_rings_reset(struct tg3 *tp)
tw32_mailbox(tp->napi[i].prodmbox, 0);
tw32_rx_mbox(tp->napi[i].consmbox, 0);
tw32_mailbox_f(tp->napi[i].int_mbox, 1);
tp->napi[0].chk_msi_cnt = 0;
tp->napi[i].chk_msi_cnt = 0;
tp->napi[i].last_rx_cons = 0;
tp->napi[i].last_tx_cons = 0;
}
Expand Down Expand Up @@ -9185,8 +9185,7 @@ static void tg3_chk_missed_msi(struct tg3 *tp)
tnapi->chk_msi_cnt++;
return;
}
tw32_mailbox(tnapi->int_mbox,
tnapi->last_tag << 24);
tg3_msi(0, tnapi);
}
}
tnapi->chk_msi_cnt = 0;
Expand Down

0 comments on commit 7f23073

Please sign in to comment.