Skip to content

Commit

Permalink
bnx2x: use mask in test_registers() to avoid parity error
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Eilon Greenstein <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Vladislav Zolotarov authored and davem330 committed Apr 19, 2010
1 parent 1ac218c commit 8eb5a20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11137,7 +11137,7 @@ static int bnx2x_test_registers(struct bnx2x *bp)

save_val = REG_RD(bp, offset);

REG_WR(bp, offset, wr_val);
REG_WR(bp, offset, (wr_val & mask));
val = REG_RD(bp, offset);

/* Restore the original register's value */
Expand Down

0 comments on commit 8eb5a20

Please sign in to comment.