Lines Matching refs:dev

100 static inline void mlx5_printk(struct mlx5_core_dev *dev, int level, const char *format, ...)  in mlx5_printk()  argument
102 struct device *device = dev->device; in mlx5_printk()
124 static inline struct device *mlx5_core_dma_dev(struct mlx5_core_dev *dev) in mlx5_core_dma_dev() argument
126 return &dev->pdev->dev; in mlx5_core_dma_dev()
147 static inline int mlx5_flexible_inlen(struct mlx5_core_dev *dev, size_t fixed, in mlx5_flexible_inlen() argument
154 mlx5_core_err(dev, "%s: %s:%d: input values too big: %zu + %zu * %zu\n", in mlx5_flexible_inlen()
160 mlx5_core_err(dev, "%s: %s:%d: multiplication overflow: %zu + %zu * %zu\n", in mlx5_flexible_inlen()
166 mlx5_core_err(dev, "%s: %s:%d: addition overflow: %zu + %zu * %zu\n", in mlx5_flexible_inlen()
174 #define MLX5_FLEXIBLE_INLEN(dev, fixed, item_size, num_items) \ argument
175 mlx5_flexible_inlen(dev, fixed, item_size, num_items, __func__, __LINE__)
177 int mlx5_core_get_caps(struct mlx5_core_dev *dev, enum mlx5_cap_type cap_type);
178 int mlx5_core_get_caps_mode(struct mlx5_core_dev *dev, enum mlx5_cap_type cap_type,
180 int mlx5_query_hca_caps(struct mlx5_core_dev *dev);
181 int mlx5_query_board_id(struct mlx5_core_dev *dev);
182 int mlx5_query_module_num(struct mlx5_core_dev *dev, int *module_num);
183 int mlx5_cmd_init(struct mlx5_core_dev *dev);
184 void mlx5_cmd_cleanup(struct mlx5_core_dev *dev);
185 int mlx5_cmd_enable(struct mlx5_core_dev *dev);
186 void mlx5_cmd_disable(struct mlx5_core_dev *dev);
187 void mlx5_cmd_set_state(struct mlx5_core_dev *dev,
189 int mlx5_cmd_init_hca(struct mlx5_core_dev *dev, uint32_t *sw_owner_id);
190 int mlx5_cmd_teardown_hca(struct mlx5_core_dev *dev);
191 int mlx5_cmd_force_teardown_hca(struct mlx5_core_dev *dev);
192 int mlx5_cmd_fast_teardown_hca(struct mlx5_core_dev *dev);
193 void mlx5_enter_error_state(struct mlx5_core_dev *dev, bool force);
194 void mlx5_error_sw_reset(struct mlx5_core_dev *dev);
195 u32 mlx5_health_check_fatal_sensors(struct mlx5_core_dev *dev);
196 int mlx5_health_wait_pci_up(struct mlx5_core_dev *dev);
197 void mlx5_disable_device(struct mlx5_core_dev *dev);
198 int mlx5_recover_device(struct mlx5_core_dev *dev);
199 int mlx5_sriov_init(struct mlx5_core_dev *dev);
200 void mlx5_sriov_cleanup(struct mlx5_core_dev *dev);
201 int mlx5_sriov_attach(struct mlx5_core_dev *dev);
202 void mlx5_sriov_detach(struct mlx5_core_dev *dev);
203 int mlx5_core_sriov_configure(struct pci_dev *dev, int num_vfs);
206 int mlx5_core_enable_hca(struct mlx5_core_dev *dev, u16 func_id);
207 int mlx5_core_disable_hca(struct mlx5_core_dev *dev, u16 func_id);
208 int mlx5_create_scheduling_element_cmd(struct mlx5_core_dev *dev, u8 hierarchy,
210 int mlx5_modify_scheduling_element_cmd(struct mlx5_core_dev *dev, u8 hierarchy,
213 int mlx5_destroy_scheduling_element_cmd(struct mlx5_core_dev *dev, u8 hierarchy,
215 int mlx5_wait_for_pages(struct mlx5_core_dev *dev, int *pages);
217 void mlx5_cmd_flush(struct mlx5_core_dev *dev);
218 void mlx5_cq_debugfs_init(struct mlx5_core_dev *dev);
219 void mlx5_cq_debugfs_cleanup(struct mlx5_core_dev *dev);
221 int mlx5_query_pcam_reg(struct mlx5_core_dev *dev, u32 *pcam, u8 feature_group,
223 int mlx5_query_mcam_reg(struct mlx5_core_dev *dev, u32 *mcap, u8 feature_group,
228 void mlx5_lag_add_netdev(struct mlx5_core_dev *dev, struct net_device *netdev);
229 void mlx5_lag_remove_netdev(struct mlx5_core_dev *dev, struct net_device *netdev);
230 void mlx5_lag_add_mdev(struct mlx5_core_dev *dev);
231 void mlx5_lag_remove_mdev(struct mlx5_core_dev *dev);
232 void mlx5_lag_disable_change(struct mlx5_core_dev *dev);
233 void mlx5_lag_enable_change(struct mlx5_core_dev *dev);
235 int mlx5_events_init(struct mlx5_core_dev *dev);
236 void mlx5_events_cleanup(struct mlx5_core_dev *dev);
237 void mlx5_events_start(struct mlx5_core_dev *dev);
238 void mlx5_events_stop(struct mlx5_core_dev *dev);
242 void mlx5_adev_cleanup(struct mlx5_core_dev *dev);
243 int mlx5_adev_init(struct mlx5_core_dev *dev);
245 int mlx5_attach_device(struct mlx5_core_dev *dev);
246 void mlx5_detach_device(struct mlx5_core_dev *dev, bool suspend);
247 int mlx5_register_device(struct mlx5_core_dev *dev);
248 void mlx5_unregister_device(struct mlx5_core_dev *dev);
249 void mlx5_dev_set_lightweight(struct mlx5_core_dev *dev);
250 bool mlx5_dev_is_lightweight(struct mlx5_core_dev *dev);
251 struct mlx5_core_dev *mlx5_get_next_phys_dev_lag(struct mlx5_core_dev *dev);
256 void mlx5_fw_reporters_create(struct mlx5_core_dev *dev);
257 int mlx5_query_mtpps(struct mlx5_core_dev *dev, u32 *mtpps, u32 mtpps_size);
262 struct mlx5_dm *mlx5_dm_create(struct mlx5_core_dev *dev);
263 void mlx5_dm_cleanup(struct mlx5_core_dev *dev);
270 int mlx5_firmware_flash(struct mlx5_core_dev *dev, const struct firmware *fw,
272 int mlx5_fw_version_query(struct mlx5_core_dev *dev,
283 static inline bool mlx5_sriov_is_enabled(struct mlx5_core_dev *dev) in mlx5_sriov_is_enabled() argument
285 return pci_num_vf(dev->pdev) ? true : false; in mlx5_sriov_is_enabled()
288 int mlx5_rescan_drivers_locked(struct mlx5_core_dev *dev);
289 static inline int mlx5_rescan_drivers(struct mlx5_core_dev *dev) in mlx5_rescan_drivers() argument
294 ret = mlx5_rescan_drivers_locked(dev); in mlx5_rescan_drivers()
299 void mlx5_lag_update(struct mlx5_core_dev *dev);
308 u8 mlx5_get_nic_state(struct mlx5_core_dev *dev);
309 void mlx5_set_nic_state(struct mlx5_core_dev *dev, u8 state);
311 static inline bool mlx5_core_is_sf(const struct mlx5_core_dev *dev) in mlx5_core_is_sf() argument
313 return dev->coredev_type == MLX5_COREDEV_SF; in mlx5_core_is_sf()
316 int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx);
317 void mlx5_mdev_uninit(struct mlx5_core_dev *dev);
318 int mlx5_init_one(struct mlx5_core_dev *dev);
319 int mlx5_init_one_devl_locked(struct mlx5_core_dev *dev);
320 void mlx5_uninit_one(struct mlx5_core_dev *dev);
321 void mlx5_unload_one(struct mlx5_core_dev *dev, bool suspend);
322 void mlx5_unload_one_devl_locked(struct mlx5_core_dev *dev, bool suspend);
323 int mlx5_load_one(struct mlx5_core_dev *dev, bool recovery);
324 int mlx5_load_one_devl_locked(struct mlx5_core_dev *dev, bool recovery);
325 int mlx5_init_one_light(struct mlx5_core_dev *dev);
326 void mlx5_uninit_one_light(struct mlx5_core_dev *dev);
327 void mlx5_unload_one_light(struct mlx5_core_dev *dev);
329 int mlx5_vport_set_other_func_cap(struct mlx5_core_dev *dev, const void *hca_cap, u16 vport,
331 #define mlx5_vport_get_other_func_general_cap(dev, vport, out) \ argument
332 mlx5_vport_get_other_func_cap(dev, vport, out, MLX5_CAP_GENERAL)
334 void mlx5_events_work_enqueue(struct mlx5_core_dev *dev, struct work_struct *work);
337 struct mlx5_core_dev *dev = pci_get_drvdata(pdev); in mlx5_sriov_get_vf_total_msix() local
339 return MLX5_CAP_GEN_MAX(dev, num_total_dynamic_vf_msix); in mlx5_sriov_get_vf_total_msix()
342 bool mlx5_eth_supported(struct mlx5_core_dev *dev);
343 bool mlx5_rdma_supported(struct mlx5_core_dev *dev);
344 bool mlx5_vnet_supported(struct mlx5_core_dev *dev);
345 bool mlx5_same_hw_devs(struct mlx5_core_dev *dev, struct mlx5_core_dev *peer_dev);
347 static inline u16 mlx5_core_ec_vf_vport_base(const struct mlx5_core_dev *dev) in mlx5_core_ec_vf_vport_base() argument
349 return MLX5_CAP_GEN_2(dev, ec_vf_vport_base); in mlx5_core_ec_vf_vport_base()
352 static inline u16 mlx5_core_ec_sriov_enabled(const struct mlx5_core_dev *dev) in mlx5_core_ec_sriov_enabled() argument
354 return mlx5_core_is_ecpf(dev) && mlx5_core_ec_vf_vport_base(dev); in mlx5_core_ec_sriov_enabled()
357 static inline bool mlx5_core_is_ec_vf_vport(const struct mlx5_core_dev *dev, u16 vport_num) in mlx5_core_is_ec_vf_vport() argument
359 int base_vport = mlx5_core_ec_vf_vport_base(dev); in mlx5_core_is_ec_vf_vport()
360 int max_vport = base_vport + mlx5_core_max_ec_vfs(dev); in mlx5_core_is_ec_vf_vport()
362 if (!mlx5_core_ec_sriov_enabled(dev)) in mlx5_core_is_ec_vf_vport()
368 static inline int mlx5_vport_to_func_id(const struct mlx5_core_dev *dev, u16 vport, bool ec_vf_func) in mlx5_vport_to_func_id() argument
370 return ec_vf_func ? vport - mlx5_core_ec_vf_vport_base(dev) + 1 in mlx5_vport_to_func_id()