IB/ipath: Fix SLID generation for RC/UC QPs when LMC > 0
authorRalph Campbell <ralph.campbell@qlogic.com>
Sun, 21 Sep 2008 03:05:51 +0000 (20:05 -0700)
committerRoland Dreier <rolandd@cisco.com>
Sun, 21 Sep 2008 03:05:51 +0000 (20:05 -0700)
The code to set the source LID in the sent LRH was not setting the low
bits if LMC != 0 for RC/UC QPs.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_rc.c
drivers/infiniband/hw/ipath/ipath_ruc.c

index 97710522624dfe16218e36b09197177a456dba87..7b93cda1a4bdcf9681c652fa525058078b48f570 100644 (file)
@@ -675,7 +675,8 @@ static void send_rc_ack(struct ipath_qp *qp)
        hdr.lrh[0] = cpu_to_be16(lrh0);
        hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid);
        hdr.lrh[2] = cpu_to_be16(hwords + SIZE_OF_CRC);
-       hdr.lrh[3] = cpu_to_be16(dd->ipath_lid);
+       hdr.lrh[3] = cpu_to_be16(dd->ipath_lid |
+                                qp->remote_ah_attr.src_path_bits);
        ohdr->bth[0] = cpu_to_be32(bth0);
        ohdr->bth[1] = cpu_to_be32(qp->remote_qpn);
        ohdr->bth[2] = cpu_to_be32(qp->r_ack_psn & IPATH_PSN_MASK);
index af051f7576638197fb9633879f08e36d78ae3620..fc0f6d9e6030f04f5412975f4d2102c67267cbd7 100644 (file)
@@ -618,7 +618,8 @@ void ipath_make_ruc_header(struct ipath_ibdev *dev, struct ipath_qp *qp,
        qp->s_hdr.lrh[0] = cpu_to_be16(lrh0);
        qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid);
        qp->s_hdr.lrh[2] = cpu_to_be16(qp->s_hdrwords + nwords + SIZE_OF_CRC);
-       qp->s_hdr.lrh[3] = cpu_to_be16(dev->dd->ipath_lid);
+       qp->s_hdr.lrh[3] = cpu_to_be16(dev->dd->ipath_lid |
+                                      qp->remote_ah_attr.src_path_bits);
        bth0 |= ipath_get_pkey(dev->dd, qp->s_pkey_index);
        bth0 |= extra_bytes << 20;
        ohdr->bth[0] = cpu_to_be32(bth0 | (1 << 22));