Lines Matching full:adapter

10 static int qlcnic_83xx_enable_vnic_mode(struct qlcnic_adapter *adapter, int lock)  in qlcnic_83xx_enable_vnic_mode()  argument
13 if (qlcnic_83xx_lock_driver(adapter)) in qlcnic_83xx_enable_vnic_mode()
16 QLCWRX(adapter->ahw, QLC_83XX_VNIC_STATE, QLCNIC_DEV_NPAR_OPER); in qlcnic_83xx_enable_vnic_mode()
18 qlcnic_83xx_unlock_driver(adapter); in qlcnic_83xx_enable_vnic_mode()
23 int qlcnic_83xx_disable_vnic_mode(struct qlcnic_adapter *adapter, int lock) in qlcnic_83xx_disable_vnic_mode() argument
25 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_83xx_disable_vnic_mode()
28 if (qlcnic_83xx_lock_driver(adapter)) in qlcnic_83xx_disable_vnic_mode()
32 QLCWRX(adapter->ahw, QLC_83XX_VNIC_STATE, QLCNIC_DEV_NPAR_NON_OPER); in qlcnic_83xx_disable_vnic_mode()
36 qlcnic_83xx_unlock_driver(adapter); in qlcnic_83xx_disable_vnic_mode()
41 int qlcnic_83xx_set_vnic_opmode(struct qlcnic_adapter *adapter) in qlcnic_83xx_set_vnic_opmode() argument
46 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_83xx_set_vnic_opmode()
48 if (qlcnic_83xx_lock_driver(adapter)) in qlcnic_83xx_set_vnic_opmode()
52 data = QLCRDX(adapter->ahw, QLC_83XX_DRV_OP_MODE); in qlcnic_83xx_set_vnic_opmode()
56 QLCWRX(adapter->ahw, QLC_83XX_DRV_OP_MODE, data); in qlcnic_83xx_set_vnic_opmode()
58 qlcnic_83xx_unlock_driver(adapter); in qlcnic_83xx_set_vnic_opmode()
64 qlcnic_83xx_config_vnic_buff_descriptors(struct qlcnic_adapter *adapter) in qlcnic_83xx_config_vnic_buff_descriptors() argument
66 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_83xx_config_vnic_buff_descriptors()
69 adapter->num_rxd = DEFAULT_RCV_DESCRIPTORS_VF; in qlcnic_83xx_config_vnic_buff_descriptors()
70 adapter->max_rxd = MAX_RCV_DESCRIPTORS_VF; in qlcnic_83xx_config_vnic_buff_descriptors()
71 adapter->num_jumbo_rxd = MAX_JUMBO_RCV_DESCRIPTORS_10G; in qlcnic_83xx_config_vnic_buff_descriptors()
72 adapter->max_jumbo_rxd = MAX_JUMBO_RCV_DESCRIPTORS_10G; in qlcnic_83xx_config_vnic_buff_descriptors()
75 adapter->num_rxd = DEFAULT_RCV_DESCRIPTORS_1G; in qlcnic_83xx_config_vnic_buff_descriptors()
76 adapter->num_jumbo_rxd = MAX_JUMBO_RCV_DESCRIPTORS_1G; in qlcnic_83xx_config_vnic_buff_descriptors()
77 adapter->max_jumbo_rxd = MAX_JUMBO_RCV_DESCRIPTORS_1G; in qlcnic_83xx_config_vnic_buff_descriptors()
78 adapter->max_rxd = MAX_RCV_DESCRIPTORS_1G; in qlcnic_83xx_config_vnic_buff_descriptors()
80 adapter->num_txd = MAX_CMD_DESCRIPTORS; in qlcnic_83xx_config_vnic_buff_descriptors()
81 adapter->max_rds_rings = MAX_RDS_RINGS; in qlcnic_83xx_config_vnic_buff_descriptors()
88 * @adapter: adapter structure
94 static int qlcnic_83xx_init_mgmt_vnic(struct qlcnic_adapter *adapter) in qlcnic_83xx_init_mgmt_vnic() argument
96 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_83xx_init_mgmt_vnic()
97 struct device *dev = &adapter->pdev->dev; in qlcnic_83xx_init_mgmt_vnic()
101 qlcnic_83xx_get_minidump_template(adapter); in qlcnic_83xx_init_mgmt_vnic()
103 if (!(adapter->flags & QLCNIC_ADAPTER_INITIALIZED)) { in qlcnic_83xx_init_mgmt_vnic()
104 if (qlcnic_init_pci_info(adapter)) in qlcnic_83xx_init_mgmt_vnic()
107 npar = adapter->npars; in qlcnic_83xx_init_mgmt_vnic()
119 if (qlcnic_83xx_set_vnic_opmode(adapter)) in qlcnic_83xx_init_mgmt_vnic()
122 if (qlcnic_set_default_offload_settings(adapter)) in qlcnic_83xx_init_mgmt_vnic()
125 if (qlcnic_reset_npar_config(adapter)) in qlcnic_83xx_init_mgmt_vnic()
129 if (qlcnic_83xx_get_port_info(adapter)) in qlcnic_83xx_init_mgmt_vnic()
132 qlcnic_83xx_config_vnic_buff_descriptors(adapter); in qlcnic_83xx_init_mgmt_vnic()
134 adapter->flags |= QLCNIC_ADAPTER_INITIALIZED; in qlcnic_83xx_init_mgmt_vnic()
135 qlcnic_83xx_enable_vnic_mode(adapter, 1); in qlcnic_83xx_init_mgmt_vnic()
143 static int qlcnic_83xx_init_privileged_vnic(struct qlcnic_adapter *adapter) in qlcnic_83xx_init_privileged_vnic() argument
147 qlcnic_83xx_get_minidump_template(adapter); in qlcnic_83xx_init_privileged_vnic()
148 if (qlcnic_83xx_get_port_info(adapter)) in qlcnic_83xx_init_privileged_vnic()
151 qlcnic_83xx_config_vnic_buff_descriptors(adapter); in qlcnic_83xx_init_privileged_vnic()
152 adapter->ahw->msix_supported = !!qlcnic_use_msi_x; in qlcnic_83xx_init_privileged_vnic()
153 adapter->flags |= QLCNIC_ADAPTER_INITIALIZED; in qlcnic_83xx_init_privileged_vnic()
155 dev_info(&adapter->pdev->dev, in qlcnic_83xx_init_privileged_vnic()
157 adapter->ahw->fw_hal_version); in qlcnic_83xx_init_privileged_vnic()
161 static int qlcnic_83xx_init_non_privileged_vnic(struct qlcnic_adapter *adapter) in qlcnic_83xx_init_non_privileged_vnic() argument
165 qlcnic_83xx_get_fw_version(adapter); in qlcnic_83xx_init_non_privileged_vnic()
166 if (qlcnic_set_eswitch_port_config(adapter)) in qlcnic_83xx_init_non_privileged_vnic()
169 if (qlcnic_83xx_get_port_info(adapter)) in qlcnic_83xx_init_non_privileged_vnic()
172 qlcnic_83xx_config_vnic_buff_descriptors(adapter); in qlcnic_83xx_init_non_privileged_vnic()
173 adapter->ahw->msix_supported = !!qlcnic_use_msi_x; in qlcnic_83xx_init_non_privileged_vnic()
174 adapter->flags |= QLCNIC_ADAPTER_INITIALIZED; in qlcnic_83xx_init_non_privileged_vnic()
176 dev_info(&adapter->pdev->dev, "HAL Version: %d, Virtual function\n", in qlcnic_83xx_init_non_privileged_vnic()
177 adapter->ahw->fw_hal_version); in qlcnic_83xx_init_non_privileged_vnic()
185 * @adapter: adapter structure
191 int qlcnic_83xx_config_vnic_opmode(struct qlcnic_adapter *adapter) in qlcnic_83xx_config_vnic_opmode() argument
194 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_83xx_config_vnic_opmode()
195 struct qlcnic_nic_template *nic_ops = adapter->nic_ops; in qlcnic_83xx_config_vnic_opmode()
197 qlcnic_get_func_no(adapter); in qlcnic_83xx_config_vnic_opmode()
198 op_mode = QLCRDX(adapter->ahw, QLC_83XX_DRV_OP_MODE); in qlcnic_83xx_config_vnic_opmode()
222 dev_err(&adapter->pdev->dev, "Invalid Virtual NIC opmode\n"); in qlcnic_83xx_config_vnic_opmode()
227 adapter->flags |= QLCNIC_ESWITCH_ENABLED; in qlcnic_83xx_config_vnic_opmode()
228 if (adapter->drv_mac_learn) in qlcnic_83xx_config_vnic_opmode()
229 adapter->rx_mac_learn = true; in qlcnic_83xx_config_vnic_opmode()
231 adapter->flags &= ~QLCNIC_ESWITCH_ENABLED; in qlcnic_83xx_config_vnic_opmode()
232 adapter->rx_mac_learn = false; in qlcnic_83xx_config_vnic_opmode()
241 int qlcnic_83xx_check_vnic_state(struct qlcnic_adapter *adapter) in qlcnic_83xx_check_vnic_state() argument
243 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_83xx_check_vnic_state()
255 dev_err(&adapter->pdev->dev, in qlcnic_83xx_check_vnic_state()
263 int qlcnic_83xx_set_port_eswitch_status(struct qlcnic_adapter *adapter, in qlcnic_83xx_set_port_eswitch_status() argument
271 err = qlcnic_get_nic_info(adapter, &nic_info, func); in qlcnic_83xx_set_port_eswitch_status()
281 adapter->eswitch[*port_id].flags |= QLCNIC_SWITCH_ENABLE; in qlcnic_83xx_set_port_eswitch_status()