Skip to content

Commit 7e8fd00

Browse files
Shahed Shaikhdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent aa2a803 commit 7e8fd00

File tree

3 files changed

+11
-35
lines changed

3 files changed

+11
-35
lines changed

drivers/net/ethernet/qlogic/qlcnic/qlcnic.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ extern int qlcnic_use_msi;
303303
extern int qlcnic_use_msi_x;
304304
extern int qlcnic_auto_fw_reset;
305305
extern int qlcnic_load_fw_file;
306-
extern int qlcnic_config_npars;
307306

308307
/* Number of status descriptors to handle per interrupt */
309308
#define MAX_STATUS_HANDLE (64)

drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,18 @@ int qlcnic_83xx_disable_vnic_mode(struct qlcnic_adapter *adapter, int lock)
4242
static int qlcnic_83xx_set_vnic_opmode(struct qlcnic_adapter *adapter)
4343
{
4444
u8 id;
45-
int i, ret = -EBUSY;
45+
int ret = -EBUSY;
4646
u32 data = QLCNIC_MGMT_FUNC;
4747
struct qlcnic_hardware_context *ahw = adapter->ahw;
4848

4949
if (qlcnic_83xx_lock_driver(adapter))
5050
return ret;
5151

52-
if (qlcnic_config_npars) {
53-
for (i = 0; i < ahw->act_pci_func; i++) {
54-
id = adapter->npars[i].pci_func;
55-
if (id == ahw->pci_func)
56-
continue;
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-
}
52+
id = ahw->pci_func;
53+
data = QLCRDX(adapter->ahw, QLC_83XX_DRV_OP_MODE);
54+
data = (data & ~QLC_83XX_SET_FUNC_OPMODE(0x3, id)) |
55+
QLC_83XX_SET_FUNC_OPMODE(QLCNIC_MGMT_FUNC, id);
56+
6657
QLCWRX(adapter->ahw, QLC_83XX_DRV_OP_MODE, data);
6758

6859
qlcnic_83xx_unlock_driver(adapter);

drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ int qlcnic_load_fw_file;
5252
MODULE_PARM_DESC(load_fw_file, "Load firmware from (0=flash, 1=file)");
5353
module_param_named(load_fw_file, qlcnic_load_fw_file, int, 0444);
5454

55-
int qlcnic_config_npars;
56-
module_param(qlcnic_config_npars, int, 0444);
57-
MODULE_PARM_DESC(qlcnic_config_npars, "Configure NPARs (0=disabled, 1=enabled)");
58-
5955
static int qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
6056
static void qlcnic_remove(struct pci_dev *pdev);
6157
static int qlcnic_open(struct net_device *netdev);
@@ -769,28 +765,18 @@ static int
769765
qlcnic_set_function_modes(struct qlcnic_adapter *adapter)
770766
{
771767
u8 id;
772-
int i, ret = 1;
768+
int ret;
773769
u32 data = QLCNIC_MGMT_FUNC;
774770
struct qlcnic_hardware_context *ahw = adapter->ahw;
775771

776772
ret = qlcnic_api_lock(adapter);
777773
if (ret)
778774
goto err_lock;
779775

780-
if (qlcnic_config_npars) {
781-
for (i = 0; i < ahw->act_pci_func; i++) {
782-
id = adapter->npars[i].pci_func;
783-
if (id == ahw->pci_func)
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-
}
776+
id = ahw->pci_func;
777+
data = QLC_SHARED_REG_RD32(adapter, QLCNIC_DRV_OP_MODE);
778+
data = (data & ~QLC_DEV_SET_DRV(0xf, id)) |
779+
QLC_DEV_SET_DRV(QLCNIC_MGMT_FUNC, id);
794780
QLC_SHARED_REG_WR32(adapter, QLCNIC_DRV_OP_MODE, data);
795781
qlcnic_api_unlock(adapter);
796782
err_lock:

0 commit comments

Comments
 (0)