Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2601d8a0 authored by Matt Carlson's avatar Matt Carlson Committed by David S. Miller
Browse files

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: default avatarMatt Carlson <mcarlson@broadcom.com>
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b28f6428
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;