From: Vladislav Zolotarov Date: Wed, 17 Feb 2010 02:03:33 +0000 (+0000) Subject: bnx2x: clean up in case of error in bnx2x_init_hw() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f1e1a199f3a68a32cf86095b3650d761ee8798b9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git bnx2x: clean up in case of error in bnx2x_init_hw() Bug fix: clean up MCP state in case of error in bnx2x_init_hw(). Author: Dmitry Kravkov Signed-off-by: Dmitry Kravkov 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 d7aef840a1d5..16685a153c10 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -7530,6 +7530,9 @@ static int bnx2x_nic_load(struct bnx2x *bp, int load_mode) rc = bnx2x_init_hw(bp, load_code); if (rc) { BNX2X_ERR("HW init failed, aborting\n"); + bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_DONE); + bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP); + bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE); goto load_error2; }