aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/qp.c
diff options
context:
space:
mode:
authorParav Pandit <parav@nvidia.com>2021-02-03 15:01:29 +0200
committerJason Gunthorpe <jgg@nvidia.com>2021-02-05 12:06:00 -0400
commit3ce60f443b143e649aa26cd3f668d645434647ac (patch)
treec0cfe2baada4a1038debdb49f4fb8b4fb601406f /drivers/infiniband/hw/mlx5/qp.c
parentRDMA/pvrdma: Replace spin_lock_irqsave with spin_lock in hard IRQ (diff)
downloadlinux-dev-3ce60f443b143e649aa26cd3f668d645434647ac.tar.xz
linux-dev-3ce60f443b143e649aa26cd3f668d645434647ac.zip
IB/mlx5: Move mlx5_port_caps from mlx5_core_dev to mlx5_ib_dev
mlx5_port_caps are RDMA specific capabilities. These are not used by the mlx5_core_device at all. Move them to mlx5_ib_dev where it is used and reduce the scope of it to multiple drivers. Link: https://lore.kernel.org/r/20210203130133.4057329-2-leon@kernel.org Signed-off-by: Parav Pandit <parav@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/hw/mlx5/qp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 88be94215708..5274349dd998 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -3177,10 +3177,10 @@ static int mlx5_set_path(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
if (ah_flags & IB_AH_GRH) {
if (grh->sgid_index >=
- dev->mdev->port_caps[port - 1].gid_table_len) {
+ dev->port_caps[port - 1].gid_table_len) {
pr_err("sgid_index (%u) too large. max is %d\n",
grh->sgid_index,
- dev->mdev->port_caps[port - 1].gid_table_len);
+ dev->port_caps[port - 1].gid_table_len);
return -EINVAL;
}
}
@@ -4311,7 +4311,7 @@ int mlx5_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
if (attr_mask & IB_QP_PKEY_INDEX) {
port = attr_mask & IB_QP_PORT ? attr->port_num : qp->port;
if (attr->pkey_index >=
- dev->mdev->port_caps[port - 1].pkey_table_len) {
+ dev->port_caps[port - 1].pkey_table_len) {
mlx5_ib_dbg(dev, "invalid pkey index %d\n",
attr->pkey_index);
goto out;