Skip to content

Commit

Permalink
tg3: Nullify RSS for loopback test
Browse files Browse the repository at this point in the history
The loopback test assumes all traffic goes to the first rx queue.  There
is a 1 in 4 chance this won't be true if RSS is enabled though.  This
patch reprograms the RSS indirection table to route all rx packets to
the first queue.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Matt Carlson authored and David S. Miller committed Apr 22, 2011
1 parent eb07a94 commit 4a85f09
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -11269,6 +11269,15 @@ static int tg3_test_loopback(struct tg3 *tp)
goto done;
}

if (tp->tg3_flags3 & TG3_FLG3_ENABLE_RSS) {
int i;

/* Reroute all rx packets to the 1st queue */
for (i = MAC_RSS_INDIR_TBL_0;
i < MAC_RSS_INDIR_TBL_0 + TG3_RSS_INDIR_TBL_SIZE; i += 4)
tw32(i, 0x0);
}

/* Turn off gphy autopowerdown. */
if (tp->phy_flags & TG3_PHYFLG_ENABLE_APD)
tg3_phy_toggle_apd(tp, false);
Expand Down

0 comments on commit 4a85f09

Please sign in to comment.