Commit 7e8fd003 authored by Shahed Shaikh's avatar Shahed Shaikh Committed by David S. Miller

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: default avatarShahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aa2a8034
...@@ -303,7 +303,6 @@ extern int qlcnic_use_msi; ...@@ -303,7 +303,6 @@ extern int qlcnic_use_msi;
extern int qlcnic_use_msi_x; extern int qlcnic_use_msi_x;
extern int qlcnic_auto_fw_reset; extern int qlcnic_auto_fw_reset;
extern int qlcnic_load_fw_file; extern int qlcnic_load_fw_file;
extern int qlcnic_config_npars;
/* Number of status descriptors to handle per interrupt */ /* Number of status descriptors to handle per interrupt */
#define MAX_STATUS_HANDLE (64) #define MAX_STATUS_HANDLE (64)
......
...@@ -42,27 +42,18 @@ int qlcnic_83xx_disable_vnic_mode(struct qlcnic_adapter *adapter, int lock) ...@@ -42,27 +42,18 @@ int qlcnic_83xx_disable_vnic_mode(struct qlcnic_adapter *adapter, int lock)
static int qlcnic_83xx_set_vnic_opmode(struct qlcnic_adapter *adapter) static int qlcnic_83xx_set_vnic_opmode(struct qlcnic_adapter *adapter)
{ {
u8 id; u8 id;
int i, ret = -EBUSY; int ret = -EBUSY;
u32 data = QLCNIC_MGMT_FUNC; u32 data = QLCNIC_MGMT_FUNC;
struct qlcnic_hardware_context *ahw = adapter->ahw; struct qlcnic_hardware_context *ahw = adapter->ahw;
if (qlcnic_83xx_lock_driver(adapter)) if (qlcnic_83xx_lock_driver(adapter))
return ret; return ret;
if (qlcnic_config_npars) { id = ahw->pci_func;
for (i = 0; i < ahw->act_pci_func; i++) { data = QLCRDX(adapter->ahw, QLC_83XX_DRV_OP_MODE);
id = adapter->npars[i].pci_func; data = (data & ~QLC_83XX_SET_FUNC_OPMODE(0x3, id)) |
if (id == ahw->pci_func) QLC_83XX_SET_FUNC_OPMODE(QLCNIC_MGMT_FUNC, id);
continue;
data |= qlcnic_config_npars &
QLC_83XX_SET_FUNC_OPMODE(0x3, id);
}
} else {
data = QLCRDX(adapter->ahw, QLC_83XX_DRV_OP_MODE);
data = (data & ~QLC_83XX_SET_FUNC_OPMODE(0x3, ahw->pci_func)) |
QLC_83XX_SET_FUNC_OPMODE(QLCNIC_MGMT_FUNC,
ahw->pci_func);
}
QLCWRX(adapter->ahw, QLC_83XX_DRV_OP_MODE, data); QLCWRX(adapter->ahw, QLC_83XX_DRV_OP_MODE, data);
qlcnic_83xx_unlock_driver(adapter); qlcnic_83xx_unlock_driver(adapter);
......
...@@ -52,10 +52,6 @@ int qlcnic_load_fw_file; ...@@ -52,10 +52,6 @@ int qlcnic_load_fw_file;
MODULE_PARM_DESC(load_fw_file, "Load firmware from (0=flash, 1=file)"); MODULE_PARM_DESC(load_fw_file, "Load firmware from (0=flash, 1=file)");
module_param_named(load_fw_file, qlcnic_load_fw_file, int, 0444); module_param_named(load_fw_file, qlcnic_load_fw_file, int, 0444);
int qlcnic_config_npars;
module_param(qlcnic_config_npars, int, 0444);
MODULE_PARM_DESC(qlcnic_config_npars, "Configure NPARs (0=disabled, 1=enabled)");
static int qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent); static int qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
static void qlcnic_remove(struct pci_dev *pdev); static void qlcnic_remove(struct pci_dev *pdev);
static int qlcnic_open(struct net_device *netdev); static int qlcnic_open(struct net_device *netdev);
...@@ -769,7 +765,7 @@ static int ...@@ -769,7 +765,7 @@ static int
qlcnic_set_function_modes(struct qlcnic_adapter *adapter) qlcnic_set_function_modes(struct qlcnic_adapter *adapter)
{ {
u8 id; u8 id;
int i, ret = 1; int ret;
u32 data = QLCNIC_MGMT_FUNC; u32 data = QLCNIC_MGMT_FUNC;
struct qlcnic_hardware_context *ahw = adapter->ahw; struct qlcnic_hardware_context *ahw = adapter->ahw;
...@@ -777,20 +773,10 @@ qlcnic_set_function_modes(struct qlcnic_adapter *adapter) ...@@ -777,20 +773,10 @@ qlcnic_set_function_modes(struct qlcnic_adapter *adapter)
if (ret) if (ret)
goto err_lock; goto err_lock;
if (qlcnic_config_npars) { id = ahw->pci_func;
for (i = 0; i < ahw->act_pci_func; i++) { data = QLC_SHARED_REG_RD32(adapter, QLCNIC_DRV_OP_MODE);
id = adapter->npars[i].pci_func; data = (data & ~QLC_DEV_SET_DRV(0xf, id)) |
if (id == ahw->pci_func) QLC_DEV_SET_DRV(QLCNIC_MGMT_FUNC, id);
continue;
data |= (qlcnic_config_npars &
QLC_DEV_SET_DRV(0xf, id));
}
} else {
data = QLC_SHARED_REG_RD32(adapter, QLCNIC_DRV_OP_MODE);
data = (data & ~QLC_DEV_SET_DRV(0xf, ahw->pci_func)) |
(QLC_DEV_SET_DRV(QLCNIC_MGMT_FUNC,
ahw->pci_func));
}
QLC_SHARED_REG_WR32(adapter, QLCNIC_DRV_OP_MODE, data); QLC_SHARED_REG_WR32(adapter, QLCNIC_DRV_OP_MODE, data);
qlcnic_api_unlock(adapter); qlcnic_api_unlock(adapter);
err_lock: err_lock:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment