Commit 02e3c6cb authored by Vladislav Zolotarov's avatar Vladislav Zolotarov Committed by David S. Miller

bnx2x: Increase DMAE max write size for 57711

Increase DMAE max write size for 57711 to the maximum allowed value.
Signed-off-by: default avatarVladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 34f24c7f
...@@ -1168,7 +1168,7 @@ static inline u32 reg_poll(struct bnx2x *bp, u32 reg, u32 expected, int ms, ...@@ -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_CMD_E1HVN_SHIFT DMAE_COMMAND_E1HVN_SHIFT
#define DMAE_LEN32_RD_MAX 0x80 #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 #define DMAE_COMP_VAL 0xe0d0d0ae
......
...@@ -352,13 +352,14 @@ void bnx2x_read_dmae(struct bnx2x *bp, u32 src_addr, u32 len32) ...@@ -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, void bnx2x_write_dmae_phys_len(struct bnx2x *bp, dma_addr_t phys_addr,
u32 addr, u32 len) u32 addr, u32 len)
{ {
int dmae_wr_max = DMAE_LEN32_WR_MAX(bp);
int offset = 0; int offset = 0;
while (len > DMAE_LEN32_WR_MAX) { while (len > dmae_wr_max) {
bnx2x_write_dmae(bp, phys_addr + offset, bnx2x_write_dmae(bp, phys_addr + offset,
addr + offset, DMAE_LEN32_WR_MAX); addr + offset, dmae_wr_max);
offset += DMAE_LEN32_WR_MAX * 4; offset += dmae_wr_max * 4;
len -= DMAE_LEN32_WR_MAX; len -= dmae_wr_max;
} }
bnx2x_write_dmae(bp, phys_addr + offset, addr + offset, len); bnx2x_write_dmae(bp, phys_addr + offset, addr + offset, len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment