diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:18:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:18:21 -0400 |
commit | 972d45fb43f0f0793fa275c4a22998106760cd61 (patch) | |
tree | f80ac6698044b179bf3fb9d686bd33083033ccb5 /drivers/infiniband/hw/mthca | |
parent | 5b6b54982258c330247957a8d877b9851ac69d53 (diff) | |
parent | 8d1cc86a6278687efbab7b8c294ab01efe4d4231 (diff) |
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
IPoIB: Convert to NAPI
IB: Return "maybe missed event" hint from ib_req_notify_cq()
IB: Add CQ comp_vector support
IB/ipath: Fix a race condition when generating ACKs
IB/ipath: Fix two more spin lock problems
IB/fmr_pool: Add prefix to all printks
IB/srp: Set proc_name
IB/srp: Add orig_dgid sysfs attribute to scsi_host
IPoIB/cm: Don't crash if remote side uses one QP for both directions
RDMA/cxgb3: Support for new abort logic
RDMA/cxgb3: Initialize cpu_idx field in cpl_close_listserv_req message
RDMA/cxgb3: Fail qp creation if the requested max_inline is too large
RDMA/cxgb3: Fix TERM codes
IPoIB/cm: Fix error handling in ipoib_cm_dev_open()
IB/ipath: Don't corrupt pending mmap list when unmapped objects are freed
IB/mthca: Work around kernel QP starvation
IB/ipath: Don't put QP in timeout queue if waiting to send
IB/ipath: Don't call spin_lock_irq() from interrupt context
Diffstat (limited to 'drivers/infiniband/hw/mthca')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_cq.c | 12 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_dev.h | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_provider.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_qp.c | 13 |
4 files changed, 24 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index efd79ef109a6..cf0868f6e965 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c | |||
@@ -726,11 +726,12 @@ repoll: | |||
726 | return err == 0 || err == -EAGAIN ? npolled : err; | 726 | return err == 0 || err == -EAGAIN ? npolled : err; |
727 | } | 727 | } |
728 | 728 | ||
729 | int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify) | 729 | int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify_flags flags) |
730 | { | 730 | { |
731 | __be32 doorbell[2]; | 731 | __be32 doorbell[2]; |
732 | 732 | ||
733 | doorbell[0] = cpu_to_be32((notify == IB_CQ_SOLICITED ? | 733 | doorbell[0] = cpu_to_be32(((flags & IB_CQ_SOLICITED_MASK) == |
734 | IB_CQ_SOLICITED ? | ||
734 | MTHCA_TAVOR_CQ_DB_REQ_NOT_SOL : | 735 | MTHCA_TAVOR_CQ_DB_REQ_NOT_SOL : |
735 | MTHCA_TAVOR_CQ_DB_REQ_NOT) | | 736 | MTHCA_TAVOR_CQ_DB_REQ_NOT) | |
736 | to_mcq(cq)->cqn); | 737 | to_mcq(cq)->cqn); |
@@ -743,7 +744,7 @@ int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify) | |||
743 | return 0; | 744 | return 0; |
744 | } | 745 | } |
745 | 746 | ||
746 | int mthca_arbel_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify notify) | 747 | int mthca_arbel_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags) |
747 | { | 748 | { |
748 | struct mthca_cq *cq = to_mcq(ibcq); | 749 | struct mthca_cq *cq = to_mcq(ibcq); |
749 | __be32 doorbell[2]; | 750 | __be32 doorbell[2]; |
@@ -755,7 +756,8 @@ int mthca_arbel_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify notify) | |||
755 | 756 | ||
756 | doorbell[0] = ci; | 757 | doorbell[0] = ci; |
757 | doorbell[1] = cpu_to_be32((cq->cqn << 8) | (2 << 5) | (sn << 3) | | 758 | doorbell[1] = cpu_to_be32((cq->cqn << 8) | (2 << 5) | (sn << 3) | |
758 | (notify == IB_CQ_SOLICITED ? 1 : 2)); | 759 | ((flags & IB_CQ_SOLICITED_MASK) == |
760 | IB_CQ_SOLICITED ? 1 : 2)); | ||
759 | 761 | ||
760 | mthca_write_db_rec(doorbell, cq->arm_db); | 762 | mthca_write_db_rec(doorbell, cq->arm_db); |
761 | 763 | ||
@@ -766,7 +768,7 @@ int mthca_arbel_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify notify) | |||
766 | wmb(); | 768 | wmb(); |
767 | 769 | ||
768 | doorbell[0] = cpu_to_be32((sn << 28) | | 770 | doorbell[0] = cpu_to_be32((sn << 28) | |
769 | (notify == IB_CQ_SOLICITED ? | 771 | ((flags & IB_CQ_SOLICITED_MASK) == IB_CQ_SOLICITED ? |
770 | MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL : | 772 | MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL : |
771 | MTHCA_ARBEL_CQ_DB_REQ_NOT) | | 773 | MTHCA_ARBEL_CQ_DB_REQ_NOT) | |
772 | cq->cqn); | 774 | cq->cqn); |
diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h index b7e42efaf43d..9bae3cc60603 100644 --- a/drivers/infiniband/hw/mthca/mthca_dev.h +++ b/drivers/infiniband/hw/mthca/mthca_dev.h | |||
@@ -495,8 +495,8 @@ void mthca_unmap_eq_icm(struct mthca_dev *dev); | |||
495 | 495 | ||
496 | int mthca_poll_cq(struct ib_cq *ibcq, int num_entries, | 496 | int mthca_poll_cq(struct ib_cq *ibcq, int num_entries, |
497 | struct ib_wc *entry); | 497 | struct ib_wc *entry); |
498 | int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify); | 498 | int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify_flags flags); |
499 | int mthca_arbel_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify); | 499 | int mthca_arbel_arm_cq(struct ib_cq *cq, enum ib_cq_notify_flags flags); |
500 | int mthca_init_cq(struct mthca_dev *dev, int nent, | 500 | int mthca_init_cq(struct mthca_dev *dev, int nent, |
501 | struct mthca_ucontext *ctx, u32 pdn, | 501 | struct mthca_ucontext *ctx, u32 pdn, |
502 | struct mthca_cq *cq); | 502 | struct mthca_cq *cq); |
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index 47e6fd46d9c2..1c05486c3c68 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c | |||
@@ -663,6 +663,7 @@ static int mthca_destroy_qp(struct ib_qp *qp) | |||
663 | } | 663 | } |
664 | 664 | ||
665 | static struct ib_cq *mthca_create_cq(struct ib_device *ibdev, int entries, | 665 | static struct ib_cq *mthca_create_cq(struct ib_device *ibdev, int entries, |
666 | int comp_vector, | ||
666 | struct ib_ucontext *context, | 667 | struct ib_ucontext *context, |
667 | struct ib_udata *udata) | 668 | struct ib_udata *udata) |
668 | { | 669 | { |
@@ -1292,6 +1293,7 @@ int mthca_register_device(struct mthca_dev *dev) | |||
1292 | (1ull << IB_USER_VERBS_CMD_DETACH_MCAST); | 1293 | (1ull << IB_USER_VERBS_CMD_DETACH_MCAST); |
1293 | dev->ib_dev.node_type = RDMA_NODE_IB_CA; | 1294 | dev->ib_dev.node_type = RDMA_NODE_IB_CA; |
1294 | dev->ib_dev.phys_port_cnt = dev->limits.num_ports; | 1295 | dev->ib_dev.phys_port_cnt = dev->limits.num_ports; |
1296 | dev->ib_dev.num_comp_vectors = 1; | ||
1295 | dev->ib_dev.dma_device = &dev->pdev->dev; | 1297 | dev->ib_dev.dma_device = &dev->pdev->dev; |
1296 | dev->ib_dev.query_device = mthca_query_device; | 1298 | dev->ib_dev.query_device = mthca_query_device; |
1297 | dev->ib_dev.query_port = mthca_query_port; | 1299 | dev->ib_dev.query_port = mthca_query_port; |
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 8fe6fee7a97a..fee60c852d14 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c | |||
@@ -701,6 +701,19 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, | |||
701 | qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_PRIMARY_ADDR_PATH); | 701 | qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_PRIMARY_ADDR_PATH); |
702 | } | 702 | } |
703 | 703 | ||
704 | if (ibqp->qp_type == IB_QPT_RC && | ||
705 | cur_state == IB_QPS_INIT && new_state == IB_QPS_RTR) { | ||
706 | u8 sched_queue = ibqp->uobject ? 0x2 : 0x1; | ||
707 | |||
708 | if (mthca_is_memfree(dev)) | ||
709 | qp_context->rlkey_arbel_sched_queue |= sched_queue; | ||
710 | else | ||
711 | qp_context->tavor_sched_queue |= cpu_to_be32(sched_queue); | ||
712 | |||
713 | qp_param->opt_param_mask |= | ||
714 | cpu_to_be32(MTHCA_QP_OPTPAR_SCHED_QUEUE); | ||
715 | } | ||
716 | |||
704 | if (attr_mask & IB_QP_TIMEOUT) { | 717 | if (attr_mask & IB_QP_TIMEOUT) { |
705 | qp_context->pri_path.ackto = attr->timeout << 3; | 718 | qp_context->pri_path.ackto = attr->timeout << 3; |
706 | qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_ACK_TIMEOUT); | 719 | qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_ACK_TIMEOUT); |