]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
tg3: Off-by-one error in RSS setup
authorMatt Carlson <mcarlson@broadcom.com>
Sat, 5 Jun 2010 17:24:33 +0000 (17:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Jun 2010 00:56:00 +0000 (17:56 -0700)
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>
drivers/net/tg3.c

index 86f8798a88e29c7cc4aa19b3d0b3a248ed431ec5..3dccc58e649676456b3213d5fc6a7041afa86e31 100644 (file)
@@ -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;