aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/qp.c
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2007-06-21 05:27:47 -0400
committerRoland Dreier <rolandd@cisco.com>2007-07-12 18:41:00 -0400
commit6a775e2ba4f7635849ade628e64723ab2beef0bc (patch)
tree3c80d06d5f2f7135c81dddc2dcd6e536f9ecf22d /drivers/net/mlx4/qp.c
parent6164c8cd1333403a28202f7c7e64ff9086d8f1aa (diff)
IB/mlx4: Implement query QP
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/net/mlx4/qp.c')
-rw-r--r--drivers/net/mlx4/qp.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c
index 492cfaaaa75c..19b48c71cf7f 100644
--- a/drivers/net/mlx4/qp.c
+++ b/drivers/net/mlx4/qp.c
@@ -277,3 +277,24 @@ void mlx4_cleanup_qp_table(struct mlx4_dev *dev)
277 mlx4_CONF_SPECIAL_QP(dev, 0); 277 mlx4_CONF_SPECIAL_QP(dev, 0);
278 mlx4_bitmap_cleanup(&mlx4_priv(dev)->qp_table.bitmap); 278 mlx4_bitmap_cleanup(&mlx4_priv(dev)->qp_table.bitmap);
279} 279}
280
281int mlx4_qp_query(struct mlx4_dev *dev, struct mlx4_qp *qp,
282 struct mlx4_qp_context *context)
283{
284 struct mlx4_cmd_mailbox *mailbox;
285 int err;
286
287 mailbox = mlx4_alloc_cmd_mailbox(dev);
288 if (IS_ERR(mailbox))
289 return PTR_ERR(mailbox);
290
291 err = mlx4_cmd_box(dev, 0, mailbox->dma, qp->qpn, 0,
292 MLX4_CMD_QUERY_QP, MLX4_CMD_TIME_CLASS_A);
293 if (!err)
294 memcpy(context, mailbox->buf + 8, sizeof *context);
295
296 mlx4_free_cmd_mailbox(dev, mailbox);
297 return err;
298}
299EXPORT_SYMBOL_GPL(mlx4_qp_query);
300