aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorVladislav Zolotarov <vladz@broadcom.com>2010-04-18 21:14:37 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-19 16:17:10 -0400
commit8eb5a20ccc67d85d52ead88fb263eb28814ca2b4 (patch)
tree3c85251d8c415a26235e7de615e378950c57c67d /drivers/net/bnx2x_main.c
parent1ac218c83fbfc6bcdbef36b38f79d0ee08420285 (diff)
bnx2x: use mask in test_registers() to avoid parity error
Properly mask the value to be written to the register (according to the register size) during the self-test. Otherwise immediate parity error would be generated. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 23528deaf98d..d7c00748e270 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -11137,7 +11137,7 @@ static int bnx2x_test_registers(struct bnx2x *bp)
11137 11137
11138 save_val = REG_RD(bp, offset); 11138 save_val = REG_RD(bp, offset);
11139 11139
11140 REG_WR(bp, offset, wr_val); 11140 REG_WR(bp, offset, (wr_val & mask));
11141 val = REG_RD(bp, offset); 11141 val = REG_RD(bp, offset);
11142 11142
11143 /* Restore the original register's value */ 11143 /* Restore the original register's value */