diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2011-04-20 11:57:37 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-22 04:05:56 +0400 |
commit | 4a85f09831329bc5a5e4b9bca3f3ecbffb78f858 (patch) | |
tree | 52a78da888c23e4530f7fff9ac49e583283e02ff /drivers | |
parent | eb07a9408e05f67caa671bdf2a509a4d2bd05abf (diff) | |
download | linux-4a85f09831329bc5a5e4b9bca3f3ecbffb78f858.tar.xz |
tg3: Nullify RSS for loopback test
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tg3.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 4aecb0a82e56..1f233c49b4f0 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -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); |