diff options
author | Roland Dreier <rolandd@cisco.com> | 2010-01-06 16:16:47 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-01-06 16:16:47 -0500 |
commit | 0139fd7c2ffd830e571d56f60198306ac24b726e (patch) | |
tree | 64526574eeeced6ababb769f72a1ee7a93c091d3 /drivers | |
parent | fd4582a3999e03fa9eae315bf14c88fd32d44035 (diff) | |
parent | b4f77264cd1a858ee09da8dba5a2711a649adbf3 (diff) |
Merge branches 'misc' and 'mlx4' into for-next
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/mlx4/srq.c | 6 | ||||
-rw-r--r-- | drivers/net/mlx4/main.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 989555cee883..2a97c964b9ef 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -1752,7 +1752,7 @@ int mlx4_ib_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr, | |||
1752 | ind = qp->rq.head & (qp->rq.wqe_cnt - 1); | 1752 | ind = qp->rq.head & (qp->rq.wqe_cnt - 1); |
1753 | 1753 | ||
1754 | for (nreq = 0; wr; ++nreq, wr = wr->next) { | 1754 | for (nreq = 0; wr; ++nreq, wr = wr->next) { |
1755 | if (mlx4_wq_overflow(&qp->rq, nreq, qp->ibqp.send_cq)) { | 1755 | if (mlx4_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { |
1756 | err = -ENOMEM; | 1756 | err = -ENOMEM; |
1757 | *bad_wr = wr; | 1757 | *bad_wr = wr; |
1758 | goto out; | 1758 | goto out; |
diff --git a/drivers/infiniband/hw/mlx4/srq.c b/drivers/infiniband/hw/mlx4/srq.c index d42565258fb7..cf8085bcbd6d 100644 --- a/drivers/infiniband/hw/mlx4/srq.c +++ b/drivers/infiniband/hw/mlx4/srq.c | |||
@@ -74,6 +74,7 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd, | |||
74 | struct mlx4_ib_dev *dev = to_mdev(pd->device); | 74 | struct mlx4_ib_dev *dev = to_mdev(pd->device); |
75 | struct mlx4_ib_srq *srq; | 75 | struct mlx4_ib_srq *srq; |
76 | struct mlx4_wqe_srq_next_seg *next; | 76 | struct mlx4_wqe_srq_next_seg *next; |
77 | struct mlx4_wqe_data_seg *scatter; | ||
77 | int desc_size; | 78 | int desc_size; |
78 | int buf_size; | 79 | int buf_size; |
79 | int err; | 80 | int err; |
@@ -149,6 +150,11 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd, | |||
149 | next = get_wqe(srq, i); | 150 | next = get_wqe(srq, i); |
150 | next->next_wqe_index = | 151 | next->next_wqe_index = |
151 | cpu_to_be16((i + 1) & (srq->msrq.max - 1)); | 152 | cpu_to_be16((i + 1) & (srq->msrq.max - 1)); |
153 | |||
154 | for (scatter = (void *) (next + 1); | ||
155 | (void *) scatter < (void *) next + desc_size; | ||
156 | ++scatter) | ||
157 | scatter->lkey = cpu_to_be32(MLX4_INVALID_LKEY); | ||
152 | } | 158 | } |
153 | 159 | ||
154 | err = mlx4_mtt_init(dev->dev, srq->buf.npages, srq->buf.page_shift, | 160 | err = mlx4_mtt_init(dev->dev, srq->buf.npages, srq->buf.page_shift, |
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 291a505fd4fc..3cf56d90d859 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c | |||
@@ -1174,7 +1174,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1174 | return 0; | 1174 | return 0; |
1175 | 1175 | ||
1176 | err_port: | 1176 | err_port: |
1177 | for (port = 1; port <= dev->caps.num_ports; port++) | 1177 | for (--port; port >= 1; --port) |
1178 | mlx4_cleanup_port_info(&priv->port[port]); | 1178 | mlx4_cleanup_port_info(&priv->port[port]); |
1179 | 1179 | ||
1180 | mlx4_cleanup_mcg_table(dev); | 1180 | mlx4_cleanup_mcg_table(dev); |