Browse Source

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>
Vladislav Zolotarov 15 years ago
parent
commit
8eb5a20ccc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/net/bnx2x_main.c

+ 1 - 1
drivers/net/bnx2x_main.c

@@ -11137,7 +11137,7 @@ static int bnx2x_test_registers(struct bnx2x *bp)
 
 
 			save_val = REG_RD(bp, offset);
 			save_val = REG_RD(bp, offset);
 
 
-			REG_WR(bp, offset, wr_val);
+			REG_WR(bp, offset, (wr_val & mask));
 			val = REG_RD(bp, offset);
 			val = REG_RD(bp, offset);
 
 
 			/* Restore the original register's value */
 			/* Restore the original register's value */