aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qlcnic
diff options
context:
space:
mode:
authorShahed Shaikh <shahed.shaikh@qlogic.com>2013-05-23 17:04:28 -0400
committerDavid S. Miller <davem@davemloft.net>2013-05-25 02:04:54 -0400
commit7e8fd003c96dda2920a4ba0c32d54780d15dfefc (patch)
treed75ce51f9993c7fb6afff73de0c9b795a90b7bc2 /drivers/net/ethernet/qlogic/qlcnic
parentaa2a80340ce0b4a148ae8878142d17bc793ba2ab (diff)
qlcnic: Remove qlcnic_config_npars module parameter
qlcnic_config_npars module parameter is used to configure NPAR operational modes where NPAR function is used for PCI passthrough. Removing this paramter as PCI passthrough is not supported for NPAR functions. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic.h1
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c21
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c24
3 files changed, 11 insertions, 35 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index c1b693cb3df3..60f310a542da 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -303,7 +303,6 @@ extern int qlcnic_use_msi;
303extern int qlcnic_use_msi_x; 303extern int qlcnic_use_msi_x;
304extern int qlcnic_auto_fw_reset; 304extern int qlcnic_auto_fw_reset;
305extern int qlcnic_load_fw_file; 305extern int qlcnic_load_fw_file;
306extern int qlcnic_config_npars;
307 306
308/* Number of status descriptors to handle per interrupt */ 307/* Number of status descriptors to handle per interrupt */
309#define MAX_STATUS_HANDLE (64) 308#define MAX_STATUS_HANDLE (64)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
index b0c3de9ede03..55e5e1b5ad4f 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
@@ -42,27 +42,18 @@ int qlcnic_83xx_disable_vnic_mode(struct qlcnic_adapter *adapter, int lock)
42static int qlcnic_83xx_set_vnic_opmode(struct qlcnic_adapter *adapter) 42static int qlcnic_83xx_set_vnic_opmode(struct qlcnic_adapter *adapter)
43{ 43{
44 u8 id; 44 u8 id;
45 int i, ret = -EBUSY; 45 int ret = -EBUSY;
46 u32 data = QLCNIC_MGMT_FUNC; 46 u32 data = QLCNIC_MGMT_FUNC;
47 struct qlcnic_hardware_context *ahw = adapter->ahw; 47 struct qlcnic_hardware_context *ahw = adapter->ahw;
48 48
49 if (qlcnic_83xx_lock_driver(adapter)) 49 if (qlcnic_83xx_lock_driver(adapter))
50 return ret; 50 return ret;
51 51
52 if (qlcnic_config_npars) { 52 id = ahw->pci_func;
53 for (i = 0; i < ahw->act_pci_func; i++) { 53 data = QLCRDX(adapter->ahw, QLC_83XX_DRV_OP_MODE);
54 id = adapter->npars[i].pci_func; 54 data = (data & ~QLC_83XX_SET_FUNC_OPMODE(0x3, id)) |
55 if (id == ahw->pci_func) 55 QLC_83XX_SET_FUNC_OPMODE(QLCNIC_MGMT_FUNC, id);
56 continue; 56
57 data |= qlcnic_config_npars &
58 QLC_83XX_SET_FUNC_OPMODE(0x3, id);
59 }
60 } else {
61 data = QLCRDX(adapter->ahw, QLC_83XX_DRV_OP_MODE);
62 data = (data & ~QLC_83XX_SET_FUNC_OPMODE(0x3, ahw->pci_func)) |
63 QLC_83XX_SET_FUNC_OPMODE(QLCNIC_MGMT_FUNC,
64 ahw->pci_func);
65 }
66 QLCWRX(adapter->ahw, QLC_83XX_DRV_OP_MODE, data); 57 QLCWRX(adapter->ahw, QLC_83XX_DRV_OP_MODE, data);
67 58
68 qlcnic_83xx_unlock_driver(adapter); 59 qlcnic_83xx_unlock_driver(adapter);
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 76b95b48c815..5b18b0accb06 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -52,10 +52,6 @@ int qlcnic_load_fw_file;
52MODULE_PARM_DESC(load_fw_file, "Load firmware from (0=flash, 1=file)"); 52MODULE_PARM_DESC(load_fw_file, "Load firmware from (0=flash, 1=file)");
53module_param_named(load_fw_file, qlcnic_load_fw_file, int, 0444); 53module_param_named(load_fw_file, qlcnic_load_fw_file, int, 0444);
54 54
55int qlcnic_config_npars;
56module_param(qlcnic_config_npars, int, 0444);
57MODULE_PARM_DESC(qlcnic_config_npars, "Configure NPARs (0=disabled, 1=enabled)");
58
59static int qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent); 55static int qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
60static void qlcnic_remove(struct pci_dev *pdev); 56static void qlcnic_remove(struct pci_dev *pdev);
61static int qlcnic_open(struct net_device *netdev); 57static int qlcnic_open(struct net_device *netdev);
@@ -769,7 +765,7 @@ static int
769qlcnic_set_function_modes(struct qlcnic_adapter *adapter) 765qlcnic_set_function_modes(struct qlcnic_adapter *adapter)
770{ 766{
771 u8 id; 767 u8 id;
772 int i, ret = 1; 768 int ret;
773 u32 data = QLCNIC_MGMT_FUNC; 769 u32 data = QLCNIC_MGMT_FUNC;
774 struct qlcnic_hardware_context *ahw = adapter->ahw; 770 struct qlcnic_hardware_context *ahw = adapter->ahw;
775 771
@@ -777,20 +773,10 @@ qlcnic_set_function_modes(struct qlcnic_adapter *adapter)
777 if (ret) 773 if (ret)
778 goto err_lock; 774 goto err_lock;
779 775
780 if (qlcnic_config_npars) { 776 id = ahw->pci_func;
781 for (i = 0; i < ahw->act_pci_func; i++) { 777 data = QLC_SHARED_REG_RD32(adapter, QLCNIC_DRV_OP_MODE);
782 id = adapter->npars[i].pci_func; 778 data = (data & ~QLC_DEV_SET_DRV(0xf, id)) |
783 if (id == ahw->pci_func) 779 QLC_DEV_SET_DRV(QLCNIC_MGMT_FUNC, id);
784 continue;
785 data |= (qlcnic_config_npars &
786 QLC_DEV_SET_DRV(0xf, id));
787 }
788 } else {
789 data = QLC_SHARED_REG_RD32(adapter, QLCNIC_DRV_OP_MODE);
790 data = (data & ~QLC_DEV_SET_DRV(0xf, ahw->pci_func)) |
791 (QLC_DEV_SET_DRV(QLCNIC_MGMT_FUNC,
792 ahw->pci_func));
793 }
794 QLC_SHARED_REG_WR32(adapter, QLCNIC_DRV_OP_MODE, data); 780 QLC_SHARED_REG_WR32(adapter, QLCNIC_DRV_OP_MODE, data);
795 qlcnic_api_unlock(adapter); 781 qlcnic_api_unlock(adapter);
796err_lock: 782err_lock: