From: Matt Carlson Date: Sat, 5 Jun 2010 17:24:33 +0000 (+0000) Subject: tg3: Off-by-one error in RSS setup X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=2601d8a0049c8b5d29cd5adb844a305a804e505f;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- 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) for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++) { int idx = i % sizeof(val); - ent[idx] = i % (tp->irq_cnt - 1); + ent[idx] = (i % (tp->irq_cnt - 1)) + 1; if (idx == sizeof(val) - 1) { tw32(reg, val); reg += 4;