diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-02-21 05:52:49 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-02-23 16:10:43 -0500 |
commit | 2b540355cd2f46c5445030995e72c4b4fb2b775e (patch) | |
tree | 242a6e63bc0644dae6bb4a413d737d776f88a9d6 /drivers/infiniband/hw/cxgb3/iwch_qp.c | |
parent | 1836854f25b1bc63766bff06aeeb83d2a602b050 (diff) |
RDMA/cxgb3: cleanups
- don't mark static functions in C files as inline - gcc should know
best whether inlining makes sense
- never compile the unused cxio_dbg.c
- make the following needlessly global functions static:
- cxio_hal.c: cxio_hal_clear_qp_ctx()
- iwch_provider.c: iwch_get_qp()
- remove the following unused global functions:
- cxio_hal.c: cxio_allocate_stag()
- cxio_resource.: cxio_hal_get_rhdl()
- cxio_resource.: cxio_hal_put_rhdl()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/iwch_qp.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_qp.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c index 4dda2f6da2de..9ea00cc4a5f8 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_qp.c +++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c | |||
@@ -36,8 +36,8 @@ | |||
36 | 36 | ||
37 | #define NO_SUPPORT -1 | 37 | #define NO_SUPPORT -1 |
38 | 38 | ||
39 | static inline int iwch_build_rdma_send(union t3_wr *wqe, struct ib_send_wr *wr, | 39 | static int iwch_build_rdma_send(union t3_wr *wqe, struct ib_send_wr *wr, |
40 | u8 * flit_cnt) | 40 | u8 * flit_cnt) |
41 | { | 41 | { |
42 | int i; | 42 | int i; |
43 | u32 plen; | 43 | u32 plen; |
@@ -96,8 +96,8 @@ static inline int iwch_build_rdma_send(union t3_wr *wqe, struct ib_send_wr *wr, | |||
96 | return 0; | 96 | return 0; |
97 | } | 97 | } |
98 | 98 | ||
99 | static inline int iwch_build_rdma_write(union t3_wr *wqe, struct ib_send_wr *wr, | 99 | static int iwch_build_rdma_write(union t3_wr *wqe, struct ib_send_wr *wr, |
100 | u8 *flit_cnt) | 100 | u8 *flit_cnt) |
101 | { | 101 | { |
102 | int i; | 102 | int i; |
103 | u32 plen; | 103 | u32 plen; |
@@ -137,8 +137,8 @@ static inline int iwch_build_rdma_write(union t3_wr *wqe, struct ib_send_wr *wr, | |||
137 | return 0; | 137 | return 0; |
138 | } | 138 | } |
139 | 139 | ||
140 | static inline int iwch_build_rdma_read(union t3_wr *wqe, struct ib_send_wr *wr, | 140 | static int iwch_build_rdma_read(union t3_wr *wqe, struct ib_send_wr *wr, |
141 | u8 *flit_cnt) | 141 | u8 *flit_cnt) |
142 | { | 142 | { |
143 | if (wr->num_sge > 1) | 143 | if (wr->num_sge > 1) |
144 | return -EINVAL; | 144 | return -EINVAL; |
@@ -158,9 +158,8 @@ static inline int iwch_build_rdma_read(union t3_wr *wqe, struct ib_send_wr *wr, | |||
158 | /* | 158 | /* |
159 | * TBD: this is going to be moved to firmware. Missing pdid/qpid check for now. | 159 | * TBD: this is going to be moved to firmware. Missing pdid/qpid check for now. |
160 | */ | 160 | */ |
161 | static inline int iwch_sgl2pbl_map(struct iwch_dev *rhp, | 161 | static int iwch_sgl2pbl_map(struct iwch_dev *rhp, struct ib_sge *sg_list, |
162 | struct ib_sge *sg_list, u32 num_sgle, | 162 | u32 num_sgle, u32 * pbl_addr, u8 * page_size) |
163 | u32 * pbl_addr, u8 * page_size) | ||
164 | { | 163 | { |
165 | int i; | 164 | int i; |
166 | struct iwch_mr *mhp; | 165 | struct iwch_mr *mhp; |
@@ -206,9 +205,8 @@ static inline int iwch_sgl2pbl_map(struct iwch_dev *rhp, | |||
206 | return 0; | 205 | return 0; |
207 | } | 206 | } |
208 | 207 | ||
209 | static inline int iwch_build_rdma_recv(struct iwch_dev *rhp, | 208 | static int iwch_build_rdma_recv(struct iwch_dev *rhp, union t3_wr *wqe, |
210 | union t3_wr *wqe, | 209 | struct ib_recv_wr *wr) |
211 | struct ib_recv_wr *wr) | ||
212 | { | 210 | { |
213 | int i, err = 0; | 211 | int i, err = 0; |
214 | u32 pbl_addr[4]; | 212 | u32 pbl_addr[4]; |
@@ -473,8 +471,7 @@ int iwch_bind_mw(struct ib_qp *qp, | |||
473 | return err; | 471 | return err; |
474 | } | 472 | } |
475 | 473 | ||
476 | static inline void build_term_codes(int t3err, u8 *layer_type, u8 *ecode, | 474 | static void build_term_codes(int t3err, u8 *layer_type, u8 *ecode, int tagged) |
477 | int tagged) | ||
478 | { | 475 | { |
479 | switch (t3err) { | 476 | switch (t3err) { |
480 | case TPT_ERR_STAG: | 477 | case TPT_ERR_STAG: |
@@ -672,7 +669,7 @@ static void __flush_qp(struct iwch_qp *qhp, unsigned long *flag) | |||
672 | spin_lock_irqsave(&qhp->lock, *flag); | 669 | spin_lock_irqsave(&qhp->lock, *flag); |
673 | } | 670 | } |
674 | 671 | ||
675 | static inline void flush_qp(struct iwch_qp *qhp, unsigned long *flag) | 672 | static void flush_qp(struct iwch_qp *qhp, unsigned long *flag) |
676 | { | 673 | { |
677 | if (t3b_device(qhp->rhp)) | 674 | if (t3b_device(qhp->rhp)) |
678 | cxio_set_wq_in_error(&qhp->wq); | 675 | cxio_set_wq_in_error(&qhp->wq); |
@@ -684,7 +681,7 @@ static inline void flush_qp(struct iwch_qp *qhp, unsigned long *flag) | |||
684 | /* | 681 | /* |
685 | * Return non zero if at least one RECV was pre-posted. | 682 | * Return non zero if at least one RECV was pre-posted. |
686 | */ | 683 | */ |
687 | static inline int rqes_posted(struct iwch_qp *qhp) | 684 | static int rqes_posted(struct iwch_qp *qhp) |
688 | { | 685 | { |
689 | return fw_riwrh_opcode((struct fw_riwrh *)qhp->wq.queue) == T3_WR_RCV; | 686 | return fw_riwrh_opcode((struct fw_riwrh *)qhp->wq.queue) == T3_WR_RCV; |
690 | } | 687 | } |