Commit 0139fd7c authored by Roland Dreier's avatar Roland Dreier

Merge branches 'misc' and 'mlx4' into for-next

parents fd4582a3 b4f77264
...@@ -1752,7 +1752,7 @@ int mlx4_ib_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr, ...@@ -1752,7 +1752,7 @@ int mlx4_ib_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
ind = qp->rq.head & (qp->rq.wqe_cnt - 1); ind = qp->rq.head & (qp->rq.wqe_cnt - 1);
for (nreq = 0; wr; ++nreq, wr = wr->next) { for (nreq = 0; wr; ++nreq, wr = wr->next) {
if (mlx4_wq_overflow(&qp->rq, nreq, qp->ibqp.send_cq)) { if (mlx4_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) {
err = -ENOMEM; err = -ENOMEM;
*bad_wr = wr; *bad_wr = wr;
goto out; goto out;
......
...@@ -74,6 +74,7 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd, ...@@ -74,6 +74,7 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd,
struct mlx4_ib_dev *dev = to_mdev(pd->device); struct mlx4_ib_dev *dev = to_mdev(pd->device);
struct mlx4_ib_srq *srq; struct mlx4_ib_srq *srq;
struct mlx4_wqe_srq_next_seg *next; struct mlx4_wqe_srq_next_seg *next;
struct mlx4_wqe_data_seg *scatter;
int desc_size; int desc_size;
int buf_size; int buf_size;
int err; int err;
...@@ -149,6 +150,11 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd, ...@@ -149,6 +150,11 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd,
next = get_wqe(srq, i); next = get_wqe(srq, i);
next->next_wqe_index = next->next_wqe_index =
cpu_to_be16((i + 1) & (srq->msrq.max - 1)); cpu_to_be16((i + 1) & (srq->msrq.max - 1));
for (scatter = (void *) (next + 1);
(void *) scatter < (void *) next + desc_size;
++scatter)
scatter->lkey = cpu_to_be32(MLX4_INVALID_LKEY);
} }
err = mlx4_mtt_init(dev->dev, srq->buf.npages, srq->buf.page_shift, err = mlx4_mtt_init(dev->dev, srq->buf.npages, srq->buf.page_shift,
......
...@@ -1174,7 +1174,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -1174,7 +1174,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
return 0; return 0;
err_port: err_port:
for (port = 1; port <= dev->caps.num_ports; port++) for (--port; port >= 1; --port)
mlx4_cleanup_port_info(&priv->port[port]); mlx4_cleanup_port_info(&priv->port[port]);
mlx4_cleanup_mcg_table(dev); mlx4_cleanup_mcg_table(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment