mlx5: Create an auxiliary device for fwctl_mlx5
authorSaeed Mahameed <saeedm@nvidia.com>
Fri, 28 Feb 2025 00:26:36 +0000 (20:26 -0400)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 6 Mar 2025 19:13:13 +0000 (15:13 -0400)
commita1ded2c18b1f4c6d216178dfecf2278348e22a7c
tree13de5e8c0818c0e7073fe5ca848e31b1ac0a0b51
parent52929c21420412b74858ee4ce71480ff9f398019
mlx5: Create an auxiliary device for fwctl_mlx5

If the device supports User Context then it can support fwctl. Create an
auxiliary device to allow fwctl to bind to it.

Create a sysfs like:

$ ls /sys/devices/pci0000:00/0000:00:0a.0/mlx5_core.fwctl.0/driver -l
lrwxrwxrwx 1 root root 0 Apr 25 19:46 /sys/devices/pci0000:00/0000:00:0a.0/mlx5_core.fwctl.0/driver -> ../../../../bus/auxiliary/drivers/mlx5_fwctl.mlx5_fwctl

Link: https://patch.msgid.link/r/8-v5-642aa0c94070+4447f-fwctl_jgg@nvidia.com
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Acked-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/dev.c