diff options
author | Vipul Pandya <vipul@chelsio.com> | 2012-05-18 11:59:33 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-05-18 22:22:37 +0200 |
commit | 67bbc05512d8a609e9a2d284dbfda9d2c50f0bf6 (patch) | |
tree | b823f58da10c376c9be2595c97d633cbc3453dd1 /drivers/infiniband/hw/cxgb4/qp.c | |
parent | RDMA/cxgb4: Remove kfifo usage (diff) | |
download | linux-67bbc05512d8a609e9a2d284dbfda9d2c50f0bf6.tar.xz linux-67bbc05512d8a609e9a2d284dbfda9d2c50f0bf6.zip |
RDMA/cxgb4: Add query_qp support
This allows querying the QP state before flushing.
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/qp.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index ba1343ee1414..45aedf1d9338 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -1711,3 +1711,14 @@ struct ib_qp *c4iw_get_qp(struct ib_device *dev, int qpn) PDBG("%s ib_dev %p qpn 0x%x\n", __func__, dev, qpn); return (struct ib_qp *)get_qhp(to_c4iw_dev(dev), qpn); } + +int c4iw_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, + int attr_mask, struct ib_qp_init_attr *init_attr) +{ + struct c4iw_qp *qhp = to_c4iw_qp(ibqp); + + memset(attr, 0, sizeof *attr); + memset(init_attr, 0, sizeof *init_attr); + attr->qp_state = to_ib_qp_state(qhp->attr.state); + return 0; +} |