aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/tg3.c
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2011-08-31 07:44:48 -0400
committerDavid S. Miller <davem@davemloft.net>2011-09-15 15:56:39 -0400
commit7f23073515c83e8a7261462329b6f26f211126d7 (patch)
tree49df6789369893bf927c78a609ec5d8116b5cc57 /drivers/net/ethernet/broadcom/tg3.c
parentb99d2a57b7d9e9e64e9193d70696b77ed035c311 (diff)
tg3: Fix missed MSI workaround
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>
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.c')
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 4e9aedada6a5..8bf9edd1a7fd 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -8105,7 +8105,7 @@ static void tg3_rings_reset(struct tg3 *tp)
8105 tw32_mailbox(tp->napi[i].prodmbox, 0); 8105 tw32_mailbox(tp->napi[i].prodmbox, 0);
8106 tw32_rx_mbox(tp->napi[i].consmbox, 0); 8106 tw32_rx_mbox(tp->napi[i].consmbox, 0);
8107 tw32_mailbox_f(tp->napi[i].int_mbox, 1); 8107 tw32_mailbox_f(tp->napi[i].int_mbox, 1);
8108 tp->napi[0].chk_msi_cnt = 0; 8108 tp->napi[i].chk_msi_cnt = 0;
8109 tp->napi[i].last_rx_cons = 0; 8109 tp->napi[i].last_rx_cons = 0;
8110 tp->napi[i].last_tx_cons = 0; 8110 tp->napi[i].last_tx_cons = 0;
8111 } 8111 }
@@ -9185,8 +9185,7 @@ static void tg3_chk_missed_msi(struct tg3 *tp)
9185 tnapi->chk_msi_cnt++; 9185 tnapi->chk_msi_cnt++;
9186 return; 9186 return;
9187 } 9187 }
9188 tw32_mailbox(tnapi->int_mbox, 9188 tg3_msi(0, tnapi);
9189 tnapi->last_tag << 24);
9190 } 9189 }
9191 } 9190 }
9192 tnapi->chk_msi_cnt = 0; 9191 tnapi->chk_msi_cnt = 0;