diff options
author | Steve Wise <swise@opengridcomputing.com> | 2007-11-26 12:28:46 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-25 17:15:26 -0500 |
commit | 457fe7b8a6822907cbe65897dc81b83d9df5bcbf (patch) | |
tree | d30b8fa4987cd928bc4975e0a85b706c1124ef29 /drivers/infiniband/hw/cxgb3 | |
parent | 7f049f2f4259e4a5c213720df1ce0c2ca095641a (diff) |
RDMA/cxgb3: Support version 5.0 firmware
The 5.0 firmware now supports translating sgls in recv work requests,
so remove the host driver logic currently doing the translation.
Note: this change requires 5.0 firmware.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb3')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_qp.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c index dd89b6b91f9c..9bb811256b28 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_qp.c +++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c | |||
@@ -208,36 +208,19 @@ static int iwch_sgl2pbl_map(struct iwch_dev *rhp, struct ib_sge *sg_list, | |||
208 | static int iwch_build_rdma_recv(struct iwch_dev *rhp, union t3_wr *wqe, | 208 | static int iwch_build_rdma_recv(struct iwch_dev *rhp, union t3_wr *wqe, |
209 | struct ib_recv_wr *wr) | 209 | struct ib_recv_wr *wr) |
210 | { | 210 | { |
211 | int i, err = 0; | 211 | int i; |
212 | u32 pbl_addr[4]; | ||
213 | u8 page_size[4]; | ||
214 | if (wr->num_sge > T3_MAX_SGE) | 212 | if (wr->num_sge > T3_MAX_SGE) |
215 | return -EINVAL; | 213 | return -EINVAL; |
216 | err = iwch_sgl2pbl_map(rhp, wr->sg_list, wr->num_sge, pbl_addr, | ||
217 | page_size); | ||
218 | if (err) | ||
219 | return err; | ||
220 | wqe->recv.pagesz[0] = page_size[0]; | ||
221 | wqe->recv.pagesz[1] = page_size[1]; | ||
222 | wqe->recv.pagesz[2] = page_size[2]; | ||
223 | wqe->recv.pagesz[3] = page_size[3]; | ||
224 | wqe->recv.num_sgle = cpu_to_be32(wr->num_sge); | 214 | wqe->recv.num_sgle = cpu_to_be32(wr->num_sge); |
225 | for (i = 0; i < wr->num_sge; i++) { | 215 | for (i = 0; i < wr->num_sge; i++) { |
226 | wqe->recv.sgl[i].stag = cpu_to_be32(wr->sg_list[i].lkey); | 216 | wqe->recv.sgl[i].stag = cpu_to_be32(wr->sg_list[i].lkey); |
227 | wqe->recv.sgl[i].len = cpu_to_be32(wr->sg_list[i].length); | 217 | wqe->recv.sgl[i].len = cpu_to_be32(wr->sg_list[i].length); |
228 | 218 | wqe->recv.sgl[i].to = cpu_to_be64(wr->sg_list[i].addr); | |
229 | /* to in the WQE == the offset into the page */ | ||
230 | wqe->recv.sgl[i].to = cpu_to_be64(((u32) wr->sg_list[i].addr) % | ||
231 | (1UL << (12 + page_size[i]))); | ||
232 | |||
233 | /* pbl_addr is the adapters address in the PBL */ | ||
234 | wqe->recv.pbl_addr[i] = cpu_to_be32(pbl_addr[i]); | ||
235 | } | 219 | } |
236 | for (; i < T3_MAX_SGE; i++) { | 220 | for (; i < T3_MAX_SGE; i++) { |
237 | wqe->recv.sgl[i].stag = 0; | 221 | wqe->recv.sgl[i].stag = 0; |
238 | wqe->recv.sgl[i].len = 0; | 222 | wqe->recv.sgl[i].len = 0; |
239 | wqe->recv.sgl[i].to = 0; | 223 | wqe->recv.sgl[i].to = 0; |
240 | wqe->recv.pbl_addr[i] = 0; | ||
241 | } | 224 | } |
242 | return 0; | 225 | return 0; |
243 | } | 226 | } |