aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_ud.c
diff options
context:
space:
mode:
authorRalph Campbell <ralph.campbell@qlogic.com>2007-09-13 14:42:52 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-09 23:55:06 -0400
commit542869a17eee2edf389273f40f757aa4e662b3da (patch)
tree720a0099a4e91e325671d0bddd506a5a2b51471c /drivers/infiniband/hw/ipath/ipath_ud.c
parent15cba26f42c13ca30cbb4388f132ac0ddf4df538 (diff)
IB/ipath: Remove duplicate copy of LMC
The LMC value was being saved by the SMA in two places. This patch cleans it up so only one copy is kept. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_ud.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_ud.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_ud.c b/drivers/infiniband/hw/ipath/ipath_ud.c
index 34c4a0a5be31..16a2a938b520 100644
--- a/drivers/infiniband/hw/ipath/ipath_ud.c
+++ b/drivers/infiniband/hw/ipath/ipath_ud.c
@@ -236,10 +236,10 @@ static void ipath_ud_loopback(struct ipath_qp *sqp, struct ipath_swqe *swqe)
236 wc.pkey_index = 0; 236 wc.pkey_index = 0;
237 wc.slid = dev->dd->ipath_lid | 237 wc.slid = dev->dd->ipath_lid |
238 (ah_attr->src_path_bits & 238 (ah_attr->src_path_bits &
239 ((1 << (dev->mkeyprot_resv_lmc & 7)) - 1)); 239 ((1 << dev->dd->ipath_lmc) - 1));
240 wc.sl = ah_attr->sl; 240 wc.sl = ah_attr->sl;
241 wc.dlid_path_bits = 241 wc.dlid_path_bits =
242 ah_attr->dlid & ((1 << (dev->mkeyprot_resv_lmc & 7)) - 1); 242 ah_attr->dlid & ((1 << dev->dd->ipath_lmc) - 1);
243 wc.port_num = 1; 243 wc.port_num = 1;
244 /* Signal completion event if the solicited bit is set. */ 244 /* Signal completion event if the solicited bit is set. */
245 ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, 245 ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc,
@@ -289,7 +289,7 @@ int ipath_make_ud_req(struct ipath_qp *qp)
289 } else { 289 } else {
290 dev->n_unicast_xmit++; 290 dev->n_unicast_xmit++;
291 lid = ah_attr->dlid & 291 lid = ah_attr->dlid &
292 ~((1 << (dev->mkeyprot_resv_lmc & 7)) - 1); 292 ~((1 << dev->dd->ipath_lmc) - 1);
293 if (unlikely(lid == dev->dd->ipath_lid)) { 293 if (unlikely(lid == dev->dd->ipath_lid)) {
294 ipath_ud_loopback(qp, wqe); 294 ipath_ud_loopback(qp, wqe);
295 goto done; 295 goto done;
@@ -341,7 +341,7 @@ int ipath_make_ud_req(struct ipath_qp *qp)
341 lid = dev->dd->ipath_lid; 341 lid = dev->dd->ipath_lid;
342 if (lid) { 342 if (lid) {
343 lid |= ah_attr->src_path_bits & 343 lid |= ah_attr->src_path_bits &
344 ((1 << (dev->mkeyprot_resv_lmc & 7)) - 1); 344 ((1 << dev->dd->ipath_lmc) - 1);
345 qp->s_hdr.lrh[3] = cpu_to_be16(lid); 345 qp->s_hdr.lrh[3] = cpu_to_be16(lid);
346 } else 346 } else
347 qp->s_hdr.lrh[3] = IB_LID_PERMISSIVE; 347 qp->s_hdr.lrh[3] = IB_LID_PERMISSIVE;
@@ -551,7 +551,7 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
551 * Save the LMC lower bits if the destination LID is a unicast LID. 551 * Save the LMC lower bits if the destination LID is a unicast LID.
552 */ 552 */
553 wc.dlid_path_bits = dlid >= IPATH_MULTICAST_LID_BASE ? 0 : 553 wc.dlid_path_bits = dlid >= IPATH_MULTICAST_LID_BASE ? 0 :
554 dlid & ((1 << (dev->mkeyprot_resv_lmc & 7)) - 1); 554 dlid & ((1 << dev->dd->ipath_lmc) - 1);
555 wc.port_num = 1; 555 wc.port_num = 1;
556 /* Signal completion event if the solicited bit is set. */ 556 /* Signal completion event if the solicited bit is set. */
557 ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, 557 ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc,