Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256529
b: refs/heads/master
c: 9d53fa1
h: refs/heads/master
i:
  256527: b7799de
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Jul 21, 2011
1 parent bf7ddb2 commit 6dae2f1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5baa5e9aa28baccd2a1227095c25bb3e999f250d
refs/heads/master: 9d53fa129628d4899083b06fa66b7ca10fed8eb4
21 changes: 15 additions & 6 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -8723,15 +8723,24 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
udelay(100);

if (tg3_flag(tp, ENABLE_RSS)) {
int i = 0;
u32 reg = MAC_RSS_INDIR_TBL_0;
u8 *ent = (u8 *)&val;

/* Setup the indirection table */
for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++) {
int idx = i % sizeof(val);
if (tp->irq_cnt == 2) {
for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i += 8) {
tw32(reg, 0x0);
reg += 4;
}
} else {
u32 val;

ent[idx] = i % (tp->irq_cnt - 1);
if (idx == sizeof(val) - 1) {
while (i < TG3_RSS_INDIR_TBL_SIZE) {
val = i % (tp->irq_cnt - 1);
i++;
for (; i % 8; i++) {
val <<= 4;
val |= (i % (tp->irq_cnt - 1));
}
tw32(reg, val);
reg += 4;
}
Expand Down

0 comments on commit 6dae2f1

Please sign in to comment.