aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/verbs.c
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-01-09 15:24:50 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-01-15 15:33:21 -0700
commitb2bedfb39541a7e14798d066b6f8685d84c8fcf5 (patch)
tree43a9f6bc4ccd3b586c0786828da9b7dfa8775e20 /drivers/infiniband/core/verbs.c
parentinfiniband: fix sw/rdmavt/* kernel-doc notation (diff)
downloadlinux-dev-b2bedfb39541a7e14798d066b6f8685d84c8fcf5.tar.xz
linux-dev-b2bedfb39541a7e14798d066b6f8685d84c8fcf5.zip
IB/core: Perform modify QP on real one
Currently qp->port stores the port number whenever IB_QP_PORT QP attribute mask is set (during QP state transition to INIT state). This port number should be stored for the real QP when XRC target QP is used. Follow the ib_modify_qp() implementation and hide the access to ->real_qp. Fixes: a512c2fbef9c ("IB/core: Introduce modify QP operation with udata") Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Daniel Jurgens <danielj@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/verbs.c')
-rw-r--r--drivers/infiniband/core/verbs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 15dd26cab5d8..be18ed7c2326 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -1324,7 +1324,7 @@ static int ib_resolve_eth_dmac(struct ib_device *device,
/**
* ib_modify_qp_with_udata - Modifies the attributes for the specified QP.
- * @qp: The QP to modify.
+ * @ib_qp: The QP to modify.
* @attr: On input, specifies the QP attributes to modify. On output,
* the current values of selected QP attributes are returned.
* @attr_mask: A bit-mask used to specify which attributes of the QP
@@ -1333,9 +1333,10 @@ static int ib_resolve_eth_dmac(struct ib_device *device,
* are being modified.
* It returns 0 on success and returns appropriate error code on error.
*/
-int ib_modify_qp_with_udata(struct ib_qp *qp, struct ib_qp_attr *attr,
+int ib_modify_qp_with_udata(struct ib_qp *ib_qp, struct ib_qp_attr *attr,
int attr_mask, struct ib_udata *udata)
{
+ struct ib_qp *qp = ib_qp->real_qp;
u8 port = attr_mask & IB_QP_PORT ? attr->port_num : qp->port;
int ret;