aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2008-07-15 02:48:49 -0400
committerRoland Dreier <rolandd@cisco.com>2008-07-15 02:48:49 -0400
commit8294f29767c53e97664a27db9974adea8e2ea95b (patch)
treeb2c2ab078539b486667fcb1464a02bedeb5b7c85 /drivers/infiniband
parent52c8084b740c42af27d5bfa62cec7079d12fbc2b (diff)
RDMA/nes: Get rid of ring_doorbell parameter of nes_post_cqp_request()
Every caller of nes_post_cqp_request() passed it NES_CQP_REQUEST_RING_DOORBELL, so just remove that parameter and always ring the doorbell. Signed-off-by: Roland Dreier <rolandd@cisco.com> Acked-by: Faisal Latif <flatif@neteffect.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/nes/nes.c2
-rw-r--r--drivers/infiniband/hw/nes/nes.h5
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.c6
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.h2
-rw-r--r--drivers/infiniband/hw/nes/nes_utils.c9
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c18
6 files changed, 19 insertions, 23 deletions
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
index a4e9269a29bd..d2884e778098 100644
--- a/drivers/infiniband/hw/nes/nes.c
+++ b/drivers/infiniband/hw/nes/nes.c
@@ -328,7 +328,7 @@ void nes_rem_ref(struct ib_qp *ibqp)
328 set_wqe_32bit_value(cqp_wqe->wqe_words, NES_CQP_WQE_ID_IDX, nesqp->hwqp.qp_id); 328 set_wqe_32bit_value(cqp_wqe->wqe_words, NES_CQP_WQE_ID_IDX, nesqp->hwqp.qp_id);
329 u64temp = (u64)nesqp->nesqp_context_pbase; 329 u64temp = (u64)nesqp->nesqp_context_pbase;
330 set_wqe_64bit_value(cqp_wqe->wqe_words, NES_CQP_QP_WQE_CONTEXT_LOW_IDX, u64temp); 330 set_wqe_64bit_value(cqp_wqe->wqe_words, NES_CQP_QP_WQE_CONTEXT_LOW_IDX, u64temp);
331 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 331 nes_post_cqp_request(nesdev, cqp_request);
332 } 332 }
333} 333}
334 334
diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h
index fe88bec48949..39bd897b40c6 100644
--- a/drivers/infiniband/hw/nes/nes.h
+++ b/drivers/infiniband/hw/nes/nes.h
@@ -94,9 +94,6 @@
94 94
95#define MAX_DPC_ITERATIONS 128 95#define MAX_DPC_ITERATIONS 128
96 96
97#define NES_CQP_REQUEST_NO_DOORBELL_RING 0
98#define NES_CQP_REQUEST_RING_DOORBELL 1
99
100#define NES_DRV_OPT_ENABLE_MPA_VER_0 0x00000001 97#define NES_DRV_OPT_ENABLE_MPA_VER_0 0x00000001
101#define NES_DRV_OPT_DISABLE_MPA_CRC 0x00000002 98#define NES_DRV_OPT_DISABLE_MPA_CRC 0x00000002
102#define NES_DRV_OPT_DISABLE_FIRST_WRITE 0x00000004 99#define NES_DRV_OPT_DISABLE_FIRST_WRITE 0x00000004
@@ -542,7 +539,7 @@ void nes_free_cqp_request(struct nes_device *nesdev,
542 struct nes_cqp_request *cqp_request); 539 struct nes_cqp_request *cqp_request);
543void nes_put_cqp_request(struct nes_device *nesdev, 540void nes_put_cqp_request(struct nes_device *nesdev,
544 struct nes_cqp_request *cqp_request); 541 struct nes_cqp_request *cqp_request);
545void nes_post_cqp_request(struct nes_device *, struct nes_cqp_request *, int); 542void nes_post_cqp_request(struct nes_device *, struct nes_cqp_request *);
546int nes_arp_table(struct nes_device *, u32, u8 *, u32); 543int nes_arp_table(struct nes_device *, u32, u8 *, u32);
547void nes_mh_fix(unsigned long); 544void nes_mh_fix(unsigned long);
548void nes_clc(unsigned long); 545void nes_clc(unsigned long);
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 80e486653ec9..902b1375a5d8 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -3147,7 +3147,7 @@ int nes_manage_apbvt(struct nes_vnic *nesvnic, u32 accel_local_port,
3147 nes_debug(NES_DBG_QP, "Waiting for CQP completion for APBVT.\n"); 3147 nes_debug(NES_DBG_QP, "Waiting for CQP completion for APBVT.\n");
3148 3148
3149 atomic_set(&cqp_request->refcount, 2); 3149 atomic_set(&cqp_request->refcount, 2);
3150 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 3150 nes_post_cqp_request(nesdev, cqp_request);
3151 3151
3152 if (add_port == NES_MANAGE_APBVT_ADD) 3152 if (add_port == NES_MANAGE_APBVT_ADD)
3153 ret = wait_event_timeout(cqp_request->waitq, (cqp_request->request_done != 0), 3153 ret = wait_event_timeout(cqp_request->waitq, (cqp_request->request_done != 0),
@@ -3217,7 +3217,7 @@ void nes_manage_arp_cache(struct net_device *netdev, unsigned char *mac_addr,
3217 nesdev->cqp.sq_head, nesdev->cqp.sq_tail); 3217 nesdev->cqp.sq_head, nesdev->cqp.sq_tail);
3218 3218
3219 atomic_set(&cqp_request->refcount, 1); 3219 atomic_set(&cqp_request->refcount, 1);
3220 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 3220 nes_post_cqp_request(nesdev, cqp_request);
3221} 3221}
3222 3222
3223 3223
@@ -3249,7 +3249,7 @@ void flush_wqes(struct nes_device *nesdev, struct nes_qp *nesqp,
3249 cpu_to_le32(NES_CQP_FLUSH_WQES | which_wq); 3249 cpu_to_le32(NES_CQP_FLUSH_WQES | which_wq);
3250 cqp_wqe->wqe_words[NES_CQP_WQE_ID_IDX] = cpu_to_le32(nesqp->hwqp.qp_id); 3250 cqp_wqe->wqe_words[NES_CQP_WQE_ID_IDX] = cpu_to_le32(nesqp->hwqp.qp_id);
3251 3251
3252 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 3252 nes_post_cqp_request(nesdev, cqp_request);
3253 3253
3254 if (wait_completion) { 3254 if (wait_completion) {
3255 /* Wait for CQP */ 3255 /* Wait for CQP */
diff --git a/drivers/infiniband/hw/nes/nes_hw.h b/drivers/infiniband/hw/nes/nes_hw.h
index 745bf94f3f07..7b81e0ae0076 100644
--- a/drivers/infiniband/hw/nes/nes_hw.h
+++ b/drivers/infiniband/hw/nes/nes_hw.h
@@ -1172,7 +1172,7 @@ struct nes_vnic {
1172 u32 mcrq_qp_id; 1172 u32 mcrq_qp_id;
1173 struct nes_ucontext *mcrq_ucontext; 1173 struct nes_ucontext *mcrq_ucontext;
1174 struct nes_cqp_request* (*get_cqp_request)(struct nes_device *nesdev); 1174 struct nes_cqp_request* (*get_cqp_request)(struct nes_device *nesdev);
1175 void (*post_cqp_request)(struct nes_device*, struct nes_cqp_request *, int); 1175 void (*post_cqp_request)(struct nes_device*, struct nes_cqp_request *);
1176 int (*mcrq_mcast_filter)( struct nes_vnic* nesvnic, __u8* dmi_addr ); 1176 int (*mcrq_mcast_filter)( struct nes_vnic* nesvnic, __u8* dmi_addr );
1177 struct net_device_stats netstats; 1177 struct net_device_stats netstats;
1178 /* used to put the netdev on the adapters logical port list */ 1178 /* used to put the netdev on the adapters logical port list */
diff --git a/drivers/infiniband/hw/nes/nes_utils.c b/drivers/infiniband/hw/nes/nes_utils.c
index 8f519c860872..fb8cbd71a2ef 100644
--- a/drivers/infiniband/hw/nes/nes_utils.c
+++ b/drivers/infiniband/hw/nes/nes_utils.c
@@ -596,7 +596,7 @@ void nes_put_cqp_request(struct nes_device *nesdev,
596 * nes_post_cqp_request 596 * nes_post_cqp_request
597 */ 597 */
598void nes_post_cqp_request(struct nes_device *nesdev, 598void nes_post_cqp_request(struct nes_device *nesdev,
599 struct nes_cqp_request *cqp_request, int ring_doorbell) 599 struct nes_cqp_request *cqp_request)
600{ 600{
601 struct nes_hw_cqp_wqe *cqp_wqe; 601 struct nes_hw_cqp_wqe *cqp_wqe;
602 unsigned long flags; 602 unsigned long flags;
@@ -624,10 +624,9 @@ void nes_post_cqp_request(struct nes_device *nesdev,
624 nesdev->cqp.sq_head, nesdev->cqp.sq_tail, nesdev->cqp.sq_size, 624 nesdev->cqp.sq_head, nesdev->cqp.sq_tail, nesdev->cqp.sq_size,
625 cqp_request->waiting, atomic_read(&cqp_request->refcount)); 625 cqp_request->waiting, atomic_read(&cqp_request->refcount));
626 barrier(); 626 barrier();
627 if (ring_doorbell) { 627
628 /* Ring doorbell (1 WQEs) */ 628 /* Ring doorbell (1 WQEs) */
629 nes_write32(nesdev->regs+NES_WQE_ALLOC, 0x01800000 | nesdev->cqp.qp_id); 629 nes_write32(nesdev->regs+NES_WQE_ALLOC, 0x01800000 | nesdev->cqp.qp_id);
630 }
631 630
632 barrier(); 631 barrier();
633 } else { 632 } else {
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 464a98a6e119..e3939d13484e 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -118,7 +118,7 @@ static struct ib_mw *nes_alloc_mw(struct ib_pd *ibpd) {
118 set_wqe_32bit_value(cqp_wqe->wqe_words, NES_CQP_STAG_WQE_STAG_IDX, stag); 118 set_wqe_32bit_value(cqp_wqe->wqe_words, NES_CQP_STAG_WQE_STAG_IDX, stag);
119 119
120 atomic_set(&cqp_request->refcount, 2); 120 atomic_set(&cqp_request->refcount, 2);
121 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 121 nes_post_cqp_request(nesdev, cqp_request);
122 122
123 /* Wait for CQP */ 123 /* Wait for CQP */
124 ret = wait_event_timeout(cqp_request->waitq, (cqp_request->request_done != 0), 124 ret = wait_event_timeout(cqp_request->waitq, (cqp_request->request_done != 0),
@@ -175,7 +175,7 @@ static int nes_dealloc_mw(struct ib_mw *ibmw)
175 set_wqe_32bit_value(cqp_wqe->wqe_words, NES_CQP_STAG_WQE_STAG_IDX, ibmw->rkey); 175 set_wqe_32bit_value(cqp_wqe->wqe_words, NES_CQP_STAG_WQE_STAG_IDX, ibmw->rkey);
176 176
177 atomic_set(&cqp_request->refcount, 2); 177 atomic_set(&cqp_request->refcount, 2);
178 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 178 nes_post_cqp_request(nesdev, cqp_request);
179 179
180 /* Wait for CQP */ 180 /* Wait for CQP */
181 nes_debug(NES_DBG_MR, "Waiting for deallocate STag 0x%08X to complete.\n", 181 nes_debug(NES_DBG_MR, "Waiting for deallocate STag 0x%08X to complete.\n",
@@ -477,7 +477,7 @@ static struct ib_fmr *nes_alloc_fmr(struct ib_pd *ibpd,
477 (nesfmr->nesmr.pbls_used-1) : nesfmr->nesmr.pbls_used); 477 (nesfmr->nesmr.pbls_used-1) : nesfmr->nesmr.pbls_used);
478 478
479 atomic_set(&cqp_request->refcount, 2); 479 atomic_set(&cqp_request->refcount, 2);
480 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 480 nes_post_cqp_request(nesdev, cqp_request);
481 481
482 /* Wait for CQP */ 482 /* Wait for CQP */
483 ret = wait_event_timeout(cqp_request->waitq, (cqp_request->request_done != 0), 483 ret = wait_event_timeout(cqp_request->waitq, (cqp_request->request_done != 0),
@@ -1417,7 +1417,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
1417 set_wqe_64bit_value(cqp_wqe->wqe_words, NES_CQP_QP_WQE_CONTEXT_LOW_IDX, u64temp); 1417 set_wqe_64bit_value(cqp_wqe->wqe_words, NES_CQP_QP_WQE_CONTEXT_LOW_IDX, u64temp);
1418 1418
1419 atomic_set(&cqp_request->refcount, 2); 1419 atomic_set(&cqp_request->refcount, 2);
1420 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 1420 nes_post_cqp_request(nesdev, cqp_request);
1421 1421
1422 /* Wait for CQP */ 1422 /* Wait for CQP */
1423 nes_debug(NES_DBG_QP, "Waiting for create iWARP QP%u to complete.\n", 1423 nes_debug(NES_DBG_QP, "Waiting for create iWARP QP%u to complete.\n",
@@ -1744,7 +1744,7 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
1744 cpu_to_le32(((u32)((u64temp) >> 33)) & 0x7FFFFFFF); 1744 cpu_to_le32(((u32)((u64temp) >> 33)) & 0x7FFFFFFF);
1745 1745
1746 atomic_set(&cqp_request->refcount, 2); 1746 atomic_set(&cqp_request->refcount, 2);
1747 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 1747 nes_post_cqp_request(nesdev, cqp_request);
1748 1748
1749 /* Wait for CQP */ 1749 /* Wait for CQP */
1750 nes_debug(NES_DBG_CQ, "Waiting for create iWARP CQ%u to complete.\n", 1750 nes_debug(NES_DBG_CQ, "Waiting for create iWARP CQ%u to complete.\n",
@@ -1841,7 +1841,7 @@ static int nes_destroy_cq(struct ib_cq *ib_cq)
1841 (nescq->hw_cq.cq_number | ((u32)PCI_FUNC(nesdev->pcidev->devfn) << 16))); 1841 (nescq->hw_cq.cq_number | ((u32)PCI_FUNC(nesdev->pcidev->devfn) << 16)));
1842 nes_free_resource(nesadapter, nesadapter->allocated_cqs, nescq->hw_cq.cq_number); 1842 nes_free_resource(nesadapter, nesadapter->allocated_cqs, nescq->hw_cq.cq_number);
1843 atomic_set(&cqp_request->refcount, 2); 1843 atomic_set(&cqp_request->refcount, 2);
1844 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 1844 nes_post_cqp_request(nesdev, cqp_request);
1845 1845
1846 /* Wait for CQP */ 1846 /* Wait for CQP */
1847 nes_debug(NES_DBG_CQ, "Waiting for destroy iWARP CQ%u to complete.\n", 1847 nes_debug(NES_DBG_CQ, "Waiting for destroy iWARP CQ%u to complete.\n",
@@ -1987,7 +1987,7 @@ static int nes_reg_mr(struct nes_device *nesdev, struct nes_pd *nespd,
1987 barrier(); 1987 barrier();
1988 1988
1989 atomic_set(&cqp_request->refcount, 2); 1989 atomic_set(&cqp_request->refcount, 2);
1990 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 1990 nes_post_cqp_request(nesdev, cqp_request);
1991 1991
1992 /* Wait for CQP */ 1992 /* Wait for CQP */
1993 ret = wait_event_timeout(cqp_request->waitq, (0 != cqp_request->request_done), 1993 ret = wait_event_timeout(cqp_request->waitq, (0 != cqp_request->request_done),
@@ -2638,7 +2638,7 @@ static int nes_dereg_mr(struct ib_mr *ib_mr)
2638 set_wqe_32bit_value(cqp_wqe->wqe_words, NES_CQP_STAG_WQE_STAG_IDX, ib_mr->rkey); 2638 set_wqe_32bit_value(cqp_wqe->wqe_words, NES_CQP_STAG_WQE_STAG_IDX, ib_mr->rkey);
2639 2639
2640 atomic_set(&cqp_request->refcount, 2); 2640 atomic_set(&cqp_request->refcount, 2);
2641 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 2641 nes_post_cqp_request(nesdev, cqp_request);
2642 2642
2643 /* Wait for CQP */ 2643 /* Wait for CQP */
2644 nes_debug(NES_DBG_MR, "Waiting for deallocate STag 0x%08X completed\n", ib_mr->rkey); 2644 nes_debug(NES_DBG_MR, "Waiting for deallocate STag 0x%08X completed\n", ib_mr->rkey);
@@ -2809,7 +2809,7 @@ int nes_hw_modify_qp(struct nes_device *nesdev, struct nes_qp *nesqp,
2809 set_wqe_64bit_value(cqp_wqe->wqe_words, NES_CQP_QP_WQE_CONTEXT_LOW_IDX, (u64)nesqp->nesqp_context_pbase); 2809 set_wqe_64bit_value(cqp_wqe->wqe_words, NES_CQP_QP_WQE_CONTEXT_LOW_IDX, (u64)nesqp->nesqp_context_pbase);
2810 2810
2811 atomic_set(&cqp_request->refcount, 2); 2811 atomic_set(&cqp_request->refcount, 2);
2812 nes_post_cqp_request(nesdev, cqp_request, NES_CQP_REQUEST_RING_DOORBELL); 2812 nes_post_cqp_request(nesdev, cqp_request);
2813 2813
2814 /* Wait for CQP */ 2814 /* Wait for CQP */
2815 if (wait_completion) { 2815 if (wait_completion) {