aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_main.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 37c04b4fade3..cd88c7e1bfa9 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -42,7 +42,7 @@ static int use_msi_x = 1;
42module_param(use_msi_x, int, 0444); 42module_param(use_msi_x, int, 0444);
43MODULE_PARM_DESC(use_msi_x, "MSI-X interrupt (0=disabled, 1=enabled"); 43MODULE_PARM_DESC(use_msi_x, "MSI-X interrupt (0=disabled, 1=enabled");
44 44
45static int auto_fw_reset = AUTO_FW_RESET_ENABLED; 45static int auto_fw_reset = 1;
46module_param(auto_fw_reset, int, 0644); 46module_param(auto_fw_reset, int, 0644);
47MODULE_PARM_DESC(auto_fw_reset, "Auto firmware reset (0=disabled, 1=enabled"); 47MODULE_PARM_DESC(auto_fw_reset, "Auto firmware reset (0=disabled, 1=enabled");
48 48
@@ -2959,8 +2959,7 @@ qlcnic_check_health(struct qlcnic_adapter *adapter)
2959 if (adapter->need_fw_reset) 2959 if (adapter->need_fw_reset)
2960 goto detach; 2960 goto detach;
2961 2961
2962 if (adapter->reset_context && 2962 if (adapter->reset_context && auto_fw_reset) {
2963 auto_fw_reset == AUTO_FW_RESET_ENABLED) {
2964 qlcnic_reset_hw_context(adapter); 2963 qlcnic_reset_hw_context(adapter);
2965 adapter->netdev->trans_start = jiffies; 2964 adapter->netdev->trans_start = jiffies;
2966 } 2965 }
@@ -2973,7 +2972,7 @@ qlcnic_check_health(struct qlcnic_adapter *adapter)
2973 2972
2974 qlcnic_dev_request_reset(adapter); 2973 qlcnic_dev_request_reset(adapter);
2975 2974
2976 if ((auto_fw_reset == AUTO_FW_RESET_ENABLED)) 2975 if (auto_fw_reset)
2977 clear_bit(__QLCNIC_FW_ATTACHED, &adapter->state); 2976 clear_bit(__QLCNIC_FW_ATTACHED, &adapter->state);
2978 2977
2979 dev_info(&netdev->dev, "firmware hang detected\n"); 2978 dev_info(&netdev->dev, "firmware hang detected\n");
@@ -2982,7 +2981,7 @@ detach:
2982 adapter->dev_state = (state == QLCNIC_DEV_NEED_QUISCENT) ? state : 2981 adapter->dev_state = (state == QLCNIC_DEV_NEED_QUISCENT) ? state :
2983 QLCNIC_DEV_NEED_RESET; 2982 QLCNIC_DEV_NEED_RESET;
2984 2983
2985 if ((auto_fw_reset == AUTO_FW_RESET_ENABLED) && 2984 if (auto_fw_reset &&
2986 !test_and_set_bit(__QLCNIC_RESETTING, &adapter->state)) { 2985 !test_and_set_bit(__QLCNIC_RESETTING, &adapter->state)) {
2987 2986
2988 qlcnic_schedule_work(adapter, qlcnic_detach_work, 0); 2987 qlcnic_schedule_work(adapter, qlcnic_detach_work, 0);
@@ -3654,10 +3653,8 @@ validate_npar_config(struct qlcnic_adapter *adapter,
3654 if (adapter->npars[pci_func].type != QLCNIC_TYPE_NIC) 3653 if (adapter->npars[pci_func].type != QLCNIC_TYPE_NIC)
3655 return QL_STATUS_INVALID_PARAM; 3654 return QL_STATUS_INVALID_PARAM;
3656 3655
3657 if (!IS_VALID_BW(np_cfg[i].min_bw) 3656 if (!IS_VALID_BW(np_cfg[i].min_bw) ||
3658 || !IS_VALID_BW(np_cfg[i].max_bw) 3657 !IS_VALID_BW(np_cfg[i].max_bw))
3659 || !IS_VALID_RX_QUEUES(np_cfg[i].max_rx_queues)
3660 || !IS_VALID_TX_QUEUES(np_cfg[i].max_tx_queues))
3661 return QL_STATUS_INVALID_PARAM; 3658 return QL_STATUS_INVALID_PARAM;
3662 } 3659 }
3663 return 0; 3660 return 0;