mirror of https://gitee.com/openkylin/linux.git
r8169: replace BUG_ON with WARN in _rtl_eri_write
Use WARN here to avoid stopping the system. In addition print the addr and mask values that triggered the warning. v2: - return on WARN to avoid an invalid register write Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
4b9c935898
commit
5f1e1224d6
|
@ -763,7 +763,9 @@ static void _rtl_eri_write(struct rtl8169_private *tp, int addr, u32 mask,
|
|||
{
|
||||
u32 cmd = ERIAR_WRITE_CMD | type | mask | addr;
|
||||
|
||||
BUG_ON((addr & 3) || (mask == 0));
|
||||
if (WARN(addr & 3 || !mask, "addr: 0x%x, mask: 0x%08x\n", addr, mask))
|
||||
return;
|
||||
|
||||
RTL_W32(tp, ERIDR, val);
|
||||
r8168fp_adjust_ocp_cmd(tp, &cmd, type);
|
||||
RTL_W32(tp, ERIAR, cmd);
|
||||
|
|
Loading…
Reference in New Issue