aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 089212214ad4..26d9e10a36d5 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -997,11 +997,7 @@ check_fw_status:
997set_dev_ready: 997set_dev_ready:
998 QLCWR32(adapter, QLCNIC_CRB_DEV_STATE, QLCNIC_DEV_READY); 998 QLCWR32(adapter, QLCNIC_CRB_DEV_STATE, QLCNIC_DEV_READY);
999 qlcnic_idc_debug_info(adapter, 1); 999 qlcnic_idc_debug_info(adapter, 1);
1000 err = qlcnic_check_npar_opertional(adapter); 1000
1001 if (err) {
1002 qlcnic_release_firmware(adapter);
1003 return err;
1004 }
1005 if (qlcnic_set_default_offload_settings(adapter)) 1001 if (qlcnic_set_default_offload_settings(adapter))
1006 goto err_out; 1002 goto err_out;
1007 if (qlcnic_reset_npar_config(adapter)) 1003 if (qlcnic_reset_npar_config(adapter))
@@ -2602,6 +2598,7 @@ skip_ack_check:
2602 2598
2603 if (!adapter->nic_ops->start_firmware(adapter)) { 2599 if (!adapter->nic_ops->start_firmware(adapter)) {
2604 qlcnic_schedule_work(adapter, qlcnic_attach_work, 0); 2600 qlcnic_schedule_work(adapter, qlcnic_attach_work, 0);
2601 adapter->fw_wait_cnt = 0;
2605 return; 2602 return;
2606 } 2603 }
2607 goto err_ret; 2604 goto err_ret;
@@ -2617,6 +2614,7 @@ wait_npar:
2617 case QLCNIC_DEV_READY: 2614 case QLCNIC_DEV_READY:
2618 if (!adapter->nic_ops->start_firmware(adapter)) { 2615 if (!adapter->nic_ops->start_firmware(adapter)) {
2619 qlcnic_schedule_work(adapter, qlcnic_attach_work, 0); 2616 qlcnic_schedule_work(adapter, qlcnic_attach_work, 0);
2617 adapter->fw_wait_cnt = 0;
2620 return; 2618 return;
2621 } 2619 }
2622 case QLCNIC_DEV_FAILED: 2620 case QLCNIC_DEV_FAILED:
@@ -2750,7 +2748,21 @@ qlcnic_attach_work(struct work_struct *work)
2750 struct qlcnic_adapter *adapter = container_of(work, 2748 struct qlcnic_adapter *adapter = container_of(work,
2751 struct qlcnic_adapter, fw_work.work); 2749 struct qlcnic_adapter, fw_work.work);
2752 struct net_device *netdev = adapter->netdev; 2750 struct net_device *netdev = adapter->netdev;
2751 u32 npar_state;
2753 2752
2753 if (adapter->op_mode != QLCNIC_MGMT_FUNC) {
2754 npar_state = QLCRD32(adapter, QLCNIC_CRB_DEV_NPAR_STATE);
2755 if (adapter->fw_wait_cnt++ > QLCNIC_DEV_NPAR_OPER_TIMEO)
2756 qlcnic_clr_all_drv_state(adapter, 0);
2757 else if (npar_state != QLCNIC_DEV_NPAR_OPER)
2758 qlcnic_schedule_work(adapter, qlcnic_attach_work,
2759 FW_POLL_DELAY);
2760 else
2761 goto attach;
2762 QLCDB(adapter, DRV, "Waiting for NPAR state to operational\n");
2763 return;
2764 }
2765attach:
2754 if (netif_running(netdev)) { 2766 if (netif_running(netdev)) {
2755 if (qlcnic_up(adapter, netdev)) 2767 if (qlcnic_up(adapter, netdev))
2756 goto done; 2768 goto done;