diff options
Diffstat (limited to 'drivers/net/bnx2x_init_ops.h')
-rw-r--r-- | drivers/net/bnx2x_init_ops.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/bnx2x_init_ops.h b/drivers/net/bnx2x_init_ops.h index 38b970a14fd7..2b1363a6fe78 100644 --- a/drivers/net/bnx2x_init_ops.h +++ b/drivers/net/bnx2x_init_ops.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Static functions needed during the initialization. | 2 | * Static functions needed during the initialization. |
3 | * This file is "included" in bnx2x_main.c. | 3 | * This file is "included" in bnx2x_main.c. |
4 | * | 4 | * |
5 | * Copyright (c) 2007-2009 Broadcom Corporation | 5 | * Copyright (c) 2007-2010 Broadcom Corporation |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -138,11 +138,16 @@ static void bnx2x_write_big_buf_wb(struct bnx2x *bp, u32 addr, u32 len) | |||
138 | static void bnx2x_init_wr_wb(struct bnx2x *bp, u32 addr, const u32 *data, | 138 | static void bnx2x_init_wr_wb(struct bnx2x *bp, u32 addr, const u32 *data, |
139 | u32 len) | 139 | u32 len) |
140 | { | 140 | { |
141 | const u32 *old_data = data; | ||
142 | |||
141 | data = (const u32 *)bnx2x_sel_blob(bp, addr, (const u8 *)data); | 143 | data = (const u32 *)bnx2x_sel_blob(bp, addr, (const u8 *)data); |
142 | 144 | ||
143 | if (bp->dmae_ready) | 145 | if (bp->dmae_ready) { |
144 | VIRT_WR_DMAE_LEN(bp, data, addr, len); | 146 | if (old_data != data) |
145 | else | 147 | VIRT_WR_DMAE_LEN(bp, data, addr, len, 1); |
148 | else | ||
149 | VIRT_WR_DMAE_LEN(bp, data, addr, len, 0); | ||
150 | } else | ||
146 | bnx2x_init_ind_wr(bp, addr, data, len); | 151 | bnx2x_init_ind_wr(bp, addr, data, len); |
147 | } | 152 | } |
148 | 153 | ||