Commit e3553b29 authored by Eilon Greenstein's avatar Eilon Greenstein Committed by David S. Miller

bnx2x: Stop loading if error condition detected

Signed-off-by: default avatarBenjamin Li <benli@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df4770de
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
} while (0) } while (0)
#else #else
#define bnx2x_panic() do { \ #define bnx2x_panic() do { \
bp->panic = 1; \
BNX2X_ERR("driver assert\n"); \ BNX2X_ERR("driver assert\n"); \
bnx2x_panic_dump(bp); \ bnx2x_panic_dump(bp); \
} while (0) } while (0)
......
...@@ -7109,6 +7109,9 @@ static int bnx2x_wait_ramrod(struct bnx2x *bp, int state, int idx, ...@@ -7109,6 +7109,9 @@ static int bnx2x_wait_ramrod(struct bnx2x *bp, int state, int idx,
} }
msleep(1); msleep(1);
if (bp->panic)
return -EIO;
} }
/* timeout! */ /* timeout! */
...@@ -7373,7 +7376,12 @@ static int bnx2x_nic_load(struct bnx2x *bp, int load_mode) ...@@ -7373,7 +7376,12 @@ static int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
rc = bnx2x_setup_leading(bp); rc = bnx2x_setup_leading(bp);
if (rc) { if (rc) {
BNX2X_ERR("Setup leading failed!\n"); BNX2X_ERR("Setup leading failed!\n");
#ifndef BNX2X_STOP_ON_ERROR
goto load_error3; goto load_error3;
#else
bp->panic = 1;
return -EBUSY;
#endif
} }
if (CHIP_IS_E1H(bp)) if (CHIP_IS_E1H(bp))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment