qlcnic: Fix set driver version command

Driver was issuing set driver version command through all
functions in the adapter. Fix the driver to issue set driver
version once per adapter, through function 0.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Himanshu Madhani 2013-08-15 08:29:27 -04:00 committed by David S. Miller
parent 6829309926
commit 24866d15fa
2 changed files with 6 additions and 3 deletions

View File

@ -629,7 +629,8 @@ int qlcnic_83xx_idc_reattach_driver(struct qlcnic_adapter *adapter)
return -EIO;
}
qlcnic_set_drv_version(adapter);
if (adapter->portnum == 0)
qlcnic_set_drv_version(adapter);
qlcnic_83xx_idc_attach_driver(adapter);
return 0;

View File

@ -2165,7 +2165,8 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (err)
goto err_out_disable_mbx_intr;
qlcnic_set_drv_version(adapter);
if (adapter->portnum == 0)
qlcnic_set_drv_version(adapter);
pci_set_drvdata(pdev, adapter);
@ -3085,7 +3086,8 @@ qlcnic_attach_work(struct work_struct *work)
adapter->fw_fail_cnt = 0;
adapter->flags &= ~QLCNIC_FW_HANG;
clear_bit(__QLCNIC_RESETTING, &adapter->state);
qlcnic_set_drv_version(adapter);
if (adapter->portnum == 0)
qlcnic_set_drv_version(adapter);
if (!qlcnic_clr_drv_state(adapter))
qlcnic_schedule_work(adapter, qlcnic_fw_poll_work,