From: Dragos Tatulea Emit an informational message when a data direct device is bound to a PF, showing the data direct BDF alongside the PF BDF (the mlx5_core log prefix), to make the mapping observable from dmesg. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu Signed-off-by: Tariq Toukan --- drivers/net/ethernet/mellanox/mlx5/core/data_direct.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/data_direct.c b/drivers/net/ethernet/mellanox/mlx5/core/data_direct.c index 5afb11a2a9f0..7db94b8a5b79 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/data_direct.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/data_direct.c @@ -21,6 +21,7 @@ static LIST_HEAD(mlx5_data_direct_reg_list); static DEFINE_MUTEX(mlx5_data_direct_mutex); struct mlx5_data_direct_registration { + struct mlx5_core_dev *mdev; char vuid[MLX5_ST_SZ_BYTES(array1024_auto) + 1]; struct list_head list; struct blocking_notifier_head users; @@ -189,6 +190,9 @@ static void mlx5_data_direct_bind(struct mlx5_data_direct_registration *reg, struct mlx5_data_direct_dev *dev) { WRITE_ONCE(reg->dd.dev, dev); + + mlx5_core_info(reg->mdev, "bound data direct device %s\n", + pci_name(dev->pdev)); } static void @@ -212,6 +216,7 @@ int mlx5_data_direct_init(struct mlx5_core_dev *mdev) if (!reg) return -ENOMEM; + reg->mdev = mdev; BLOCKING_INIT_NOTIFIER_HEAD(®->users); err = mlx5_data_direct_query_vuid(mdev, reg->vuid); -- 2.44.0