From: Vladislav Zolotarov Date: Mon, 19 Apr 2010 01:14:37 +0000 (+0000) Subject: bnx2x: use mask in test_registers() to avoid parity error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8eb5a20ccc67d85d52ead88fb263eb28814ca2b4;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller --- 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) 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 */