Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194290
b: refs/heads/master
c: 02e3c6c
h: refs/heads/master
v: v3
  • Loading branch information
Vladislav Zolotarov authored and David S. Miller committed Apr 19, 2010
1 parent 523f83d commit 837ab0e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 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: 34f24c7fc095a2d884e634ff430ab0da6f2a0669
refs/heads/master: 02e3c6cb3f09ac10a1f16d16cf31c8ecaafd2c67
2 changes: 1 addition & 1 deletion trunk/drivers/net/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ static inline u32 reg_poll(struct bnx2x *bp, u32 reg, u32 expected, int ms,
#define DMAE_CMD_E1HVN_SHIFT DMAE_COMMAND_E1HVN_SHIFT

#define DMAE_LEN32_RD_MAX 0x80
#define DMAE_LEN32_WR_MAX 0x400
#define DMAE_LEN32_WR_MAX(bp) (CHIP_IS_E1(bp) ? 0x400 : 0x2000)

#define DMAE_COMP_VAL 0xe0d0d0ae

Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,14 @@ void bnx2x_read_dmae(struct bnx2x *bp, u32 src_addr, u32 len32)
void bnx2x_write_dmae_phys_len(struct bnx2x *bp, dma_addr_t phys_addr,
u32 addr, u32 len)
{
int dmae_wr_max = DMAE_LEN32_WR_MAX(bp);
int offset = 0;

while (len > DMAE_LEN32_WR_MAX) {
while (len > dmae_wr_max) {
bnx2x_write_dmae(bp, phys_addr + offset,
addr + offset, DMAE_LEN32_WR_MAX);
offset += DMAE_LEN32_WR_MAX * 4;
len -= DMAE_LEN32_WR_MAX;
addr + offset, dmae_wr_max);
offset += dmae_wr_max * 4;
len -= dmae_wr_max;
}

bnx2x_write_dmae(bp, phys_addr + offset, addr + offset, len);
Expand Down

0 comments on commit 837ab0e

Please sign in to comment.