aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2010-06-05 13:24:33 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-06 20:56:00 -0400
commit2601d8a0049c8b5d29cd5adb844a305a804e505f (patch)
treeea2ab7f93806fd5e13004b623d3c8c25b51a380b /drivers/net/tg3.c
parentb28f6428af279ffb9e97ee00486a29498b7fcfdc (diff)
tg3: Off-by-one error in RSS setup
The driver was incorrectly programming the indirection table such that rx traffic intended for the second ring went to the first ring, rx traffic intended for the third ring went to the second ring, etc. This patch changes the code so that rx traffic is diverted to the proper ring. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 86f8798a88e2..3dccc58e6496 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -8228,7 +8228,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
8228 for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++) { 8228 for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++) {
8229 int idx = i % sizeof(val); 8229 int idx = i % sizeof(val);
8230 8230
8231 ent[idx] = i % (tp->irq_cnt - 1); 8231 ent[idx] = (i % (tp->irq_cnt - 1)) + 1;
8232 if (idx == sizeof(val) - 1) { 8232 if (idx == sizeof(val) - 1) {
8233 tw32(reg, val); 8233 tw32(reg, val);
8234 reg += 4; 8234 reg += 4;