aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorHimanshu Madhani <himanshu.madhani@qlogic.com>2013-08-15 08:29:27 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-15 17:35:00 -0400
commit24866d15fa07cc8f0a1a8c48846f64af4af5d72a (patch)
treef184768db373c024963375d009dcef2110639521 /drivers/net/ethernet
parent6829309926b90c4c32d1f4cafeb600cd34a721e3 (diff)
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c3
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
index 9f4b8d5f0865..345d987aede4 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
@@ -629,7 +629,8 @@ int qlcnic_83xx_idc_reattach_driver(struct qlcnic_adapter *adapter)
629 return -EIO; 629 return -EIO;
630 } 630 }
631 631
632 qlcnic_set_drv_version(adapter); 632 if (adapter->portnum == 0)
633 qlcnic_set_drv_version(adapter);
633 qlcnic_83xx_idc_attach_driver(adapter); 634 qlcnic_83xx_idc_attach_driver(adapter);
634 635
635 return 0; 636 return 0;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index ee013fcc3322..bc05d016c859 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2165,7 +2165,8 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2165 if (err) 2165 if (err)
2166 goto err_out_disable_mbx_intr; 2166 goto err_out_disable_mbx_intr;
2167 2167
2168 qlcnic_set_drv_version(adapter); 2168 if (adapter->portnum == 0)
2169 qlcnic_set_drv_version(adapter);
2169 2170
2170 pci_set_drvdata(pdev, adapter); 2171 pci_set_drvdata(pdev, adapter);
2171 2172
@@ -3085,7 +3086,8 @@ done:
3085 adapter->fw_fail_cnt = 0; 3086 adapter->fw_fail_cnt = 0;
3086 adapter->flags &= ~QLCNIC_FW_HANG; 3087 adapter->flags &= ~QLCNIC_FW_HANG;
3087 clear_bit(__QLCNIC_RESETTING, &adapter->state); 3088 clear_bit(__QLCNIC_RESETTING, &adapter->state);
3088 qlcnic_set_drv_version(adapter); 3089 if (adapter->portnum == 0)
3090 qlcnic_set_drv_version(adapter);
3089 3091
3090 if (!qlcnic_clr_drv_state(adapter)) 3092 if (!qlcnic_clr_drv_state(adapter))
3091 qlcnic_schedule_work(adapter, qlcnic_fw_poll_work, 3093 qlcnic_schedule_work(adapter, qlcnic_fw_poll_work,