Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159014
b: refs/heads/master
c: 37dbbf3
h: refs/heads/master
v: v3
  • Loading branch information
Eilon Greenstein authored and David S. Miller committed Jul 21, 2009
1 parent 95c17e7 commit 736292f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb8da205a6cac953a46a247b8dd19505eba944e2
refs/heads/master: 37dbbf32a0d45f0ed88f92cb6d0c35f4809e3a8e
17 changes: 17 additions & 0 deletions trunk/drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,11 @@ static void bnx2x_int_enable(struct bnx2x *bp)
val, port, addr, (msix ? "MSI-X" : (msi ? "MSI" : "INTx")));

REG_WR(bp, addr, val);
/*
* Ensure that HC_CONFIG is written before leading/trailing edge config
*/
mmiowb();
barrier();

if (CHIP_IS_E1H(bp)) {
/* init leading/trailing edge */
Expand All @@ -666,6 +671,9 @@ static void bnx2x_int_enable(struct bnx2x *bp)
REG_WR(bp, HC_REG_TRAILING_EDGE_0 + port*8, val);
REG_WR(bp, HC_REG_LEADING_EDGE_0 + port*8, val);
}

/* Make sure that interrupts are indeed enabled from here on */
mmiowb();
}

static void bnx2x_int_disable(struct bnx2x *bp)
Expand Down Expand Up @@ -739,6 +747,10 @@ static inline void bnx2x_ack_sb(struct bnx2x *bp, u8 sb_id,
DP(BNX2X_MSG_OFF, "write 0x%08x to HC addr 0x%x\n",
(*(u32 *)&igu_ack), hc_addr);
REG_WR(bp, hc_addr, (*(u32 *)&igu_ack));

/* Make sure that ACK is written */
mmiowb();
barrier();
}

static inline u16 bnx2x_update_fpsb_idx(struct bnx2x_fastpath *fp)
Expand Down Expand Up @@ -2429,9 +2441,14 @@ static int bnx2x_sp_post(struct bnx2x *bp, int command, int cid,
bp->spq_prod_idx++;
}

/* Make sure that BD data is updated before writing the producer */
wmb();

REG_WR(bp, BAR_XSTRORM_INTMEM + XSTORM_SPQ_PROD_OFFSET(func),
bp->spq_prod_idx);

mmiowb();

spin_unlock_bh(&bp->spq_lock);
return 0;
}
Expand Down

0 comments on commit 736292f

Please sign in to comment.