From: Matt Carlson Date: Wed, 31 Aug 2011 11:44:48 +0000 (+0000) Subject: tg3: Fix missed MSI workaround X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~677 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0eef1eb344b72033501d433051350d992cbf638b;p=users%2Fjedix%2Flinux-maple.git 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. (cherry picked from commit 7f23073515c83e8a7261462329b6f26f211126d7) Signed-off-by: Matt Carlson Reviewed-by: Benjamin Li Reviewed-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Joe Jin --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index c6de5b4d3b17..8297b0337d96 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -8111,7 +8111,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; } @@ -9193,8 +9193,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;