drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.h
Extension
.h
Size
1446 bytes
Lines
74
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct mlx5_sf_dev {
	struct auxiliary_device adev;
	struct mlx5_core_dev *parent_mdev;
	struct mlx5_core_dev *mdev;
	phys_addr_t bar_base_addr;
	u32 sfnum;
	u16 fn_id;
};

struct mlx5_sf_peer_devlink_event_ctx {
	u16 fn_id;
	struct devlink *devlink;
	int err;
};

int mlx5_sf_dev_notifier_init(struct mlx5_core_dev *dev);
void mlx5_sf_dev_table_create(struct mlx5_core_dev *dev);
void mlx5_sf_dev_notifier_cleanup(struct mlx5_core_dev *dev);
void mlx5_sf_dev_table_destroy(struct mlx5_core_dev *dev);

int mlx5_sf_driver_register(void);
void mlx5_sf_driver_unregister(void);

bool mlx5_sf_dev_allocated(const struct mlx5_core_dev *dev);

#else

static inline int mlx5_sf_dev_notifier_init(struct mlx5_core_dev *dev)
{
	return 0;
}

static inline void mlx5_sf_dev_table_create(struct mlx5_core_dev *dev)
{
}

static inline void mlx5_sf_dev_notifier_cleanup(struct mlx5_core_dev *dev)
{
}

static inline void mlx5_sf_dev_table_destroy(struct mlx5_core_dev *dev)
{
}

static inline int mlx5_sf_driver_register(void)
{
	return 0;
}

static inline void mlx5_sf_driver_unregister(void)
{
}

static inline bool mlx5_sf_dev_allocated(const struct mlx5_core_dev *dev)
{
	return false;
}

#endif

#endif

Annotation

Implementation Notes