diff options
author | Maher Sanalla <msanalla@nvidia.com> | 2021-12-15 09:54:31 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-01-05 16:40:35 -0400 |
commit | fbdb0ba7051e9b0881708c1c7bb491363cb7e486 (patch) | |
tree | dbbfadba2cd75c3c135b65e05d46943e28492de4 /drivers/infiniband/hw | |
parent | e375b9c92985e409c4bb95dd43d34915ea7f5e28 (diff) | |
download | lwn-fbdb0ba7051e9b0881708c1c7bb491363cb7e486.tar.gz lwn-fbdb0ba7051e9b0881708c1c7bb491363cb7e486.zip |
IB/mlx5: Expose NDR speed through MAD
Under MAD query port, Report NDR speed when NDR is supported in the port
capability mask.
Link: https://lore.kernel.org/r/a2ab630d2a634547db9b581faa9d65da2edb9d05.1639554831.git.leonro@nvidia.com
Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/mlx5/mad.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c index 6c536f11eab5..293ed709e5ed 100644 --- a/drivers/infiniband/hw/mlx5/mad.c +++ b/drivers/infiniband/hw/mlx5/mad.c @@ -584,6 +584,11 @@ int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u32 port, props->port_cap_flags2 & IB_PORT_LINK_SPEED_HDR_SUP) props->active_speed = IB_SPEED_HDR; break; + case 8: + if (props->port_cap_flags & IB_PORT_CAP_MASK2_SUP && + props->port_cap_flags2 & IB_PORT_LINK_SPEED_NDR_SUP) + props->active_speed = IB_SPEED_NDR; + break; } } |