]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RDMA/mlx5: Initialize phys_port_cnt earlier in RDMA device creation
authorChiara Meiohas <cmeiohas@nvidia.com>
Mon, 9 Sep 2024 17:30:21 +0000 (20:30 +0300)
committerLeon Romanovsky <leon@kernel.org>
Fri, 13 Sep 2024 05:27:40 +0000 (08:27 +0300)
commit91b4b2c62613dab3e1ec8083f1e96e5f5b2eee36
treeaefaf0edc6025e34574a50c0ae1c8143ef50515b
parent3ed7f9e239938a0cfaf3689e2f545229ecabec06
RDMA/mlx5: Initialize phys_port_cnt earlier in RDMA device creation

phys_port_cnt of the IB device must be initialized before calling
ib_device_set_netdev().

Previously, phys_port_cnt was initialized in the mlx5_ib init function.
Remove this initialization to allow setting it separately, providing
the flexibility to call ib_device_set_netdev before registering the
IB device.

Signed-off-by: Chiara Meiohas <cmeiohas@nvidia.com>
Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Link: https://patch.msgid.link/20240909173025.30422-4-michaelgur@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/ib_rep.c
drivers/infiniband/hw/mlx5/main.c