Commit c8873405 authored by Matt Carlson's avatar Matt Carlson Committed by David S. Miller
Browse files

tg3: Fix napi assignments in loopback test



The 57765 lacks TSS support.  This renders the napi assignments
incorrect in the loopback test function.  This patch fixes the problem.

Signed-off-by: default avatarMatt Carlson <mcarlson@broadcom.com>
Reviewed-by: default avatarMichael Chan <mchan@broadcom.com>
Reviewed-by: default avatarBenjamin Li <benli@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 603f1173
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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];

	if (tp->irq_cnt > 1) {
		tnapi = &tp->napi[1];
		rnapi = &tp->napi[1];
	} else {
	tnapi = &tp->napi[0];
	rnapi = &tp->napi[0];
	if (tp->irq_cnt > 1) {
		rnapi = &tp->napi[1];
		if (tp->tg3_flags3 & TG3_FLG3_ENABLE_TSS)
			tnapi = &tp->napi[1];
	}
	coal_now = tnapi->coal_now | rnapi->coal_now;