RDMA/mlx5: Move SMI caps logic
authorMark Bloch <markb@mellanox.com>
Thu, 28 Mar 2019 13:27:40 +0000 (15:27 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 10 Apr 2019 18:05:39 +0000 (15:05 -0300)
commita989ea01cb10a12bcf339ddcbbea9c49e098609f
treea9a8e54532dc12f620bf9a3fdcba48a47bb25772
parent35b0aa67b29867cdeaee32f920da3cb300dbb851
RDMA/mlx5: Move SMI caps logic

We store the SMI information in the core device's struct, make sure we set
that information only once (and not per port), while here make the for
loop based on the actual size of the array.

Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c