summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
diff options
context:
space:
mode:
authorHimanshu Madhani <himanshu.madhani@qlogic.com>2013-11-04 22:31:31 +0400
committerDavid S. Miller <davem@davemloft.net>2013-11-05 00:33:19 +0400
commit34e8c406fda5b5a9d2e126a92bab84cd28e3b5fa (patch)
tree7867f7b76c97c693425d76e424ce54aa7e0dcbd2 /drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
parentf27c75b3903ab02bfe295aa58ad61ef5b756b065 (diff)
downloadlinux-34e8c406fda5b5a9d2e126a92bab84cd28e3b5fa.tar.xz
qlcnic: refactor Tx/SDS ring calculation and validation in driver.
o Current driver has duplicate code for validating user input for changing Tx/SDS rings using set_channel ethtool interface. This patch removes duplicate code and refactored Tx/SDS ring validation for 82xx/83xx/84xx series adapter. o Refactored code now calculates maximum Tx/Rx ring driver can support based on Default, NPAR and SRIOV PF/VF mode of driver. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
index 8b96e29df30f..21a4b274d2e4 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
@@ -508,7 +508,11 @@ static int qlcnic_sriov_setup_vf(struct qlcnic_adapter *adapter,
dev_warn(&adapter->pdev->dev,
"Device does not support MSI interrupts\n");
- err = qlcnic_setup_intr(adapter, 1, 0);
+ /* compute and set default and max tx/sds rings */
+ qlcnic_set_tx_ring_count(adapter, QLCNIC_SINGLE_RING);
+ qlcnic_set_sds_ring_count(adapter, QLCNIC_SINGLE_RING);
+
+ err = qlcnic_setup_intr(adapter);
if (err) {
dev_err(&adapter->pdev->dev, "Failed to setup interrupt\n");
goto err_out_disable_msi;