diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-08 18:29:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-08 18:29:48 -0400 |
commit | e0fd9affeb64088eff407dfc98bbd3a5c17ea479 (patch) | |
tree | 94ee7e3410fffb305aa6901053b85245686444a2 /drivers/infiniband/hw | |
parent | 3d15b798eafd3b6b3cc25f20747008ab9401a57f (diff) | |
parent | ea9627c800e99a902e2668ac8e6377f02d6f720a (diff) |
Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
Pull InfiniBand/RDMA changes from Roland Dreier:
- XRC transport fixes
- Fix DHCP on IPoIB
- mlx4 preparations for flow steering
- iSER fixes
- miscellaneous other fixes
* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (23 commits)
IB/iser: Add support for iser CM REQ additional info
IB/iser: Return error to upper layers on EAGAIN registration failures
IB/iser: Move informational messages from error to info level
IB/iser: Add module version
mlx4_core: Expose a few helpers to fill DMFS HW strucutures
mlx4_core: Directly expose fields of DMFS HW rule control segment
mlx4_core: Change a few DMFS fields names to match firmare spec
mlx4: Match DMFS promiscuous field names to firmware spec
mlx4_core: Move DMFS HW structs to common header file
IB/mlx4: Set link type for RAW PACKET QPs in the QP context
IB/mlx4: Disable VLAN stripping for RAW PACKET QPs
mlx4_core: Reduce warning message for SRQ_LIMIT event to debug level
RDMA/iwcm: Don't touch cmid after dropping reference
IB/qib: Correct qib_verbs_register_sysfs() error handling
IB/ipath: Correct ipath_verbs_register_sysfs() error handling
RDMA/cxgb4: Fix SQ allocation when on-chip SQ is disabled
SRPT: Fix odd use of WARN_ON()
IPoIB: Fix ipoib_hard_header() return value
RDMA: Rename random32() to prandom_u32()
RDMA/cxgb3: Fix uninitialized variable
...
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 22 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.c | 19 | ||||
-rw-r--r-- | drivers/infiniband/hw/mlx4/cq.c | 21 | ||||
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/hw/qib/qib_sysfs.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/hw/qib/qib_verbs.c | 3 |
7 files changed, 58 insertions, 21 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index 9c12da0cbd32..e87f2201b220 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c | |||
@@ -559,7 +559,7 @@ static int iwch_reregister_phys_mem(struct ib_mr *mr, | |||
559 | __be64 *page_list = NULL; | 559 | __be64 *page_list = NULL; |
560 | int shift = 0; | 560 | int shift = 0; |
561 | u64 total_size; | 561 | u64 total_size; |
562 | int npages; | 562 | int npages = 0; |
563 | int ret; | 563 | int ret; |
564 | 564 | ||
565 | PDBG("%s ib_mr %p ib_pd %p\n", __func__, mr, pd); | 565 | PDBG("%s ib_mr %p ib_pd %p\n", __func__, mr, pd); |
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index 5b059e2d80cc..232040447e8a 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c | |||
@@ -111,6 +111,16 @@ static int alloc_host_sq(struct c4iw_rdev *rdev, struct t4_sq *sq) | |||
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |
113 | 113 | ||
114 | static int alloc_sq(struct c4iw_rdev *rdev, struct t4_sq *sq, int user) | ||
115 | { | ||
116 | int ret = -ENOSYS; | ||
117 | if (user) | ||
118 | ret = alloc_oc_sq(rdev, sq); | ||
119 | if (ret) | ||
120 | ret = alloc_host_sq(rdev, sq); | ||
121 | return ret; | ||
122 | } | ||
123 | |||
114 | static int destroy_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, | 124 | static int destroy_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, |
115 | struct c4iw_dev_ucontext *uctx) | 125 | struct c4iw_dev_ucontext *uctx) |
116 | { | 126 | { |
@@ -179,15 +189,9 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, | |||
179 | goto free_sw_rq; | 189 | goto free_sw_rq; |
180 | } | 190 | } |
181 | 191 | ||
182 | if (user) { | 192 | ret = alloc_sq(rdev, &wq->sq, user); |
183 | if (alloc_oc_sq(rdev, &wq->sq) && alloc_host_sq(rdev, &wq->sq)) | 193 | if (ret) |
184 | goto free_hwaddr; | 194 | goto free_hwaddr; |
185 | } else { | ||
186 | ret = alloc_host_sq(rdev, &wq->sq); | ||
187 | if (ret) | ||
188 | goto free_hwaddr; | ||
189 | } | ||
190 | |||
191 | memset(wq->sq.queue, 0, wq->sq.memsize); | 195 | memset(wq->sq.queue, 0, wq->sq.memsize); |
192 | dma_unmap_addr_set(&wq->sq, mapping, wq->sq.dma_addr); | 196 | dma_unmap_addr_set(&wq->sq, mapping, wq->sq.dma_addr); |
193 | 197 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index ea93870266eb..44ea9390417c 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -2187,7 +2187,8 @@ int ipath_register_ib_device(struct ipath_devdata *dd) | |||
2187 | if (ret) | 2187 | if (ret) |
2188 | goto err_reg; | 2188 | goto err_reg; |
2189 | 2189 | ||
2190 | if (ipath_verbs_register_sysfs(dev)) | 2190 | ret = ipath_verbs_register_sysfs(dev); |
2191 | if (ret) | ||
2191 | goto err_class; | 2192 | goto err_class; |
2192 | 2193 | ||
2193 | enable_timer(dd); | 2194 | enable_timer(dd); |
@@ -2327,15 +2328,15 @@ static int ipath_verbs_register_sysfs(struct ib_device *dev) | |||
2327 | int i; | 2328 | int i; |
2328 | int ret; | 2329 | int ret; |
2329 | 2330 | ||
2330 | for (i = 0; i < ARRAY_SIZE(ipath_class_attributes); ++i) | 2331 | for (i = 0; i < ARRAY_SIZE(ipath_class_attributes); ++i) { |
2331 | if (device_create_file(&dev->dev, | 2332 | ret = device_create_file(&dev->dev, |
2332 | ipath_class_attributes[i])) { | 2333 | ipath_class_attributes[i]); |
2333 | ret = 1; | 2334 | if (ret) |
2334 | goto bail; | 2335 | goto bail; |
2335 | } | 2336 | } |
2336 | 2337 | return 0; | |
2337 | ret = 0; | ||
2338 | |||
2339 | bail: | 2338 | bail: |
2339 | for (i = 0; i < ARRAY_SIZE(ipath_class_attributes); ++i) | ||
2340 | device_remove_file(&dev->dev, ipath_class_attributes[i]); | ||
2340 | return ret; | 2341 | return ret; |
2341 | } | 2342 | } |
diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c index 73b3a7132587..d5e60f44ba5a 100644 --- a/drivers/infiniband/hw/mlx4/cq.c +++ b/drivers/infiniband/hw/mlx4/cq.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/mlx4/cq.h> | 34 | #include <linux/mlx4/cq.h> |
35 | #include <linux/mlx4/qp.h> | 35 | #include <linux/mlx4/qp.h> |
36 | #include <linux/mlx4/srq.h> | ||
36 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
37 | 38 | ||
38 | #include "mlx4_ib.h" | 39 | #include "mlx4_ib.h" |
@@ -585,6 +586,7 @@ static int mlx4_ib_poll_one(struct mlx4_ib_cq *cq, | |||
585 | struct mlx4_qp *mqp; | 586 | struct mlx4_qp *mqp; |
586 | struct mlx4_ib_wq *wq; | 587 | struct mlx4_ib_wq *wq; |
587 | struct mlx4_ib_srq *srq; | 588 | struct mlx4_ib_srq *srq; |
589 | struct mlx4_srq *msrq = NULL; | ||
588 | int is_send; | 590 | int is_send; |
589 | int is_error; | 591 | int is_error; |
590 | u32 g_mlpath_rqpn; | 592 | u32 g_mlpath_rqpn; |
@@ -653,6 +655,20 @@ repoll: | |||
653 | 655 | ||
654 | wc->qp = &(*cur_qp)->ibqp; | 656 | wc->qp = &(*cur_qp)->ibqp; |
655 | 657 | ||
658 | if (wc->qp->qp_type == IB_QPT_XRC_TGT) { | ||
659 | u32 srq_num; | ||
660 | g_mlpath_rqpn = be32_to_cpu(cqe->g_mlpath_rqpn); | ||
661 | srq_num = g_mlpath_rqpn & 0xffffff; | ||
662 | /* SRQ is also in the radix tree */ | ||
663 | msrq = mlx4_srq_lookup(to_mdev(cq->ibcq.device)->dev, | ||
664 | srq_num); | ||
665 | if (unlikely(!msrq)) { | ||
666 | pr_warn("CQ %06x with entry for unknown SRQN %06x\n", | ||
667 | cq->mcq.cqn, srq_num); | ||
668 | return -EINVAL; | ||
669 | } | ||
670 | } | ||
671 | |||
656 | if (is_send) { | 672 | if (is_send) { |
657 | wq = &(*cur_qp)->sq; | 673 | wq = &(*cur_qp)->sq; |
658 | if (!(*cur_qp)->sq_signal_bits) { | 674 | if (!(*cur_qp)->sq_signal_bits) { |
@@ -666,6 +682,11 @@ repoll: | |||
666 | wqe_ctr = be16_to_cpu(cqe->wqe_index); | 682 | wqe_ctr = be16_to_cpu(cqe->wqe_index); |
667 | wc->wr_id = srq->wrid[wqe_ctr]; | 683 | wc->wr_id = srq->wrid[wqe_ctr]; |
668 | mlx4_ib_free_srq_wqe(srq, wqe_ctr); | 684 | mlx4_ib_free_srq_wqe(srq, wqe_ctr); |
685 | } else if (msrq) { | ||
686 | srq = to_mibsrq(msrq); | ||
687 | wqe_ctr = be16_to_cpu(cqe->wqe_index); | ||
688 | wc->wr_id = srq->wrid[wqe_ctr]; | ||
689 | mlx4_ib_free_srq_wqe(srq, wqe_ctr); | ||
669 | } else { | 690 | } else { |
670 | wq = &(*cur_qp)->rq; | 691 | wq = &(*cur_qp)->rq; |
671 | tail = wq->tail & (wq->wqe_cnt - 1); | 692 | tail = wq->tail & (wq->wqe_cnt - 1); |
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 35cced2a4da8..4f10af2905b5 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -1292,6 +1292,8 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, | |||
1292 | if (cur_state == IB_QPS_RESET && new_state == IB_QPS_INIT) { | 1292 | if (cur_state == IB_QPS_RESET && new_state == IB_QPS_INIT) { |
1293 | context->sq_size_stride |= !!qp->sq_no_prefetch << 7; | 1293 | context->sq_size_stride |= !!qp->sq_no_prefetch << 7; |
1294 | context->xrcd = cpu_to_be32((u32) qp->xrcdn); | 1294 | context->xrcd = cpu_to_be32((u32) qp->xrcdn); |
1295 | if (ibqp->qp_type == IB_QPT_RAW_PACKET) | ||
1296 | context->param3 |= cpu_to_be32(1 << 30); | ||
1295 | } | 1297 | } |
1296 | 1298 | ||
1297 | if (qp->ibqp.uobject) | 1299 | if (qp->ibqp.uobject) |
@@ -1458,6 +1460,10 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, | |||
1458 | } | 1460 | } |
1459 | } | 1461 | } |
1460 | 1462 | ||
1463 | if (qp->ibqp.qp_type == IB_QPT_RAW_PACKET) | ||
1464 | context->pri_path.ackto = (context->pri_path.ackto & 0xf8) | | ||
1465 | MLX4_IB_LINK_TYPE_ETH; | ||
1466 | |||
1461 | if (cur_state == IB_QPS_RTS && new_state == IB_QPS_SQD && | 1467 | if (cur_state == IB_QPS_RTS && new_state == IB_QPS_SQD && |
1462 | attr_mask & IB_QP_EN_SQD_ASYNC_NOTIFY && attr->en_sqd_async_notify) | 1468 | attr_mask & IB_QP_EN_SQD_ASYNC_NOTIFY && attr->en_sqd_async_notify) |
1463 | sqd_event = 1; | 1469 | sqd_event = 1; |
diff --git a/drivers/infiniband/hw/qib/qib_sysfs.c b/drivers/infiniband/hw/qib/qib_sysfs.c index 034cc821de5c..3c8e4e3caca6 100644 --- a/drivers/infiniband/hw/qib/qib_sysfs.c +++ b/drivers/infiniband/hw/qib/qib_sysfs.c | |||
@@ -808,10 +808,14 @@ int qib_verbs_register_sysfs(struct qib_devdata *dd) | |||
808 | for (i = 0; i < ARRAY_SIZE(qib_attributes); ++i) { | 808 | for (i = 0; i < ARRAY_SIZE(qib_attributes); ++i) { |
809 | ret = device_create_file(&dev->dev, qib_attributes[i]); | 809 | ret = device_create_file(&dev->dev, qib_attributes[i]); |
810 | if (ret) | 810 | if (ret) |
811 | return ret; | 811 | goto bail; |
812 | } | 812 | } |
813 | 813 | ||
814 | return 0; | 814 | return 0; |
815 | bail: | ||
816 | for (i = 0; i < ARRAY_SIZE(qib_attributes); ++i) | ||
817 | device_remove_file(&dev->dev, qib_attributes[i]); | ||
818 | return ret; | ||
815 | } | 819 | } |
816 | 820 | ||
817 | /* | 821 | /* |
diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c index 7c0ab16a2fe2..904c384aa361 100644 --- a/drivers/infiniband/hw/qib/qib_verbs.c +++ b/drivers/infiniband/hw/qib/qib_verbs.c | |||
@@ -2234,7 +2234,8 @@ int qib_register_ib_device(struct qib_devdata *dd) | |||
2234 | if (ret) | 2234 | if (ret) |
2235 | goto err_agents; | 2235 | goto err_agents; |
2236 | 2236 | ||
2237 | if (qib_verbs_register_sysfs(dd)) | 2237 | ret = qib_verbs_register_sysfs(dd); |
2238 | if (ret) | ||
2238 | goto err_class; | 2239 | goto err_class; |
2239 | 2240 | ||
2240 | goto bail; | 2241 | goto bail; |