From: Matt Carlson Date: Thu, 30 Sep 2010 10:34:34 +0000 (+0000) Subject: tg3: Futureproof the loopback test X-Git-Tag: v2.6.37-rc1~147^2~291 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1da85aa3db6878639e407548dad5b2404443e2c5;p=profile%2Fivi%2Fkernel-x86-ivi.git 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. Signed-off-by: Matt Carlson Reviewed-by: Michael Chan Signed-off-by: David S. Miller --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 3b27566..3c9f95d 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -10647,7 +10647,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]; }