* [PATCH 7/9] tg3: Fix napi assignments in loopback test
@ 2010-02-13 0:47 Matt Carlson
0 siblings, 0 replies; only message in thread
From: Matt Carlson @ 2010-02-13 0:47 UTC (permalink / raw)
To: davem; +Cc: netdev, andy, mcarlson
The 57765 lacks TSS support. This renders the napi assignments
incorrect in the loopback test function. This patch fixes the problem.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
---
drivers/net/tg3.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 9c4d88a..74fa6d5 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -10780,12 +10780,12 @@ static int tg3_run_loopback(struct tg3 *tp, int loopback_mode)
struct tg3_napi *tnapi, *rnapi;
struct tg3_rx_prodring_set *tpr = &tp->prodring[0];
+ tnapi = &tp->napi[0];
+ rnapi = &tp->napi[0];
if (tp->irq_cnt > 1) {
- tnapi = &tp->napi[1];
rnapi = &tp->napi[1];
- } else {
- tnapi = &tp->napi[0];
- rnapi = &tp->napi[0];
+ if (tp->tg3_flags3 & TG3_FLG3_ENABLE_TSS)
+ tnapi = &tp->napi[1];
}
coal_now = tnapi->coal_now | rnapi->coal_now;
--
1.6.4.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-13 0:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-13 0:47 [PATCH 7/9] tg3: Fix napi assignments in loopback test Matt Carlson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox