Skip to contentSkip to conversation

tg3: Futureproof the loopback test

PATCH In review Matt Carlson 1 participant 1 message Sep 30, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/8 tg3: Futureproof the loopback test

There are other multiqueue modes 5717 and 5719 devices can assume. This patch makes sure that the loopback test is safe, should those other modes be enabled in the future.

---
 drivers/net/tg3.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/tg3.c +2 -1
index d76e718..50b7e35 100644
@@ -10642,7 +10642,8 @@ static int tg3_run_loopback(struct tg3 *tp, int loopback_mode)
 	tnapi = &tp->napi[0];
 	rnapi = &tp->napi[0];
 	if (tp->irq_cnt > 1) {
-		rnapi = &tp->napi[1];
+		if (tp->tg3_flags3 & TG3_FLG3_ENABLE_RSS)
+			rnapi = &tp->napi[1];
 		if (tp->tg3_flags3 & TG3_FLG3_ENABLE_TSS)
 			tnapi = &tp->napi[1];
 	}
Signature · 1 line
1.7.2.2