summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorEilon Greenstein <eilong@broadcom.com>2009-08-12 08:23:31 +0000
committerDavid S. Miller <davem@davemloft.net>2009-08-12 23:02:48 -0700
commite3553b29c6f395c6692afccc2ed5eff9c3d1daef (patch)
treef41aae782d997cb936bdf75187ed7a480fc8536f /drivers/net/bnx2x_main.c
parentdf4770de03d2eec3f66b0ac4d2248d471a1ccc0b (diff)
downloadtalos-obmc-linux-e3553b29c6f395c6692afccc2ed5eff9c3d1daef.tar.gz
talos-obmc-linux-e3553b29c6f395c6692afccc2ed5eff9c3d1daef.zip
bnx2x: Stop loading if error condition detected
Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x_main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 8e77e933ac18..c289670a55af 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -7109,6 +7109,9 @@ static int bnx2x_wait_ramrod(struct bnx2x *bp, int state, int idx,
}
msleep(1);
+
+ if (bp->panic)
+ return -EIO;
}
/* timeout! */
@@ -7373,7 +7376,12 @@ static int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
rc = bnx2x_setup_leading(bp);
if (rc) {
BNX2X_ERR("Setup leading failed!\n");
+#ifndef BNX2X_STOP_ON_ERROR
goto load_error3;
+#else
+ bp->panic = 1;
+ return -EBUSY;
+#endif
}
if (CHIP_IS_E1H(bp))
OpenPOWER on IntegriCloud