diff options
author | Ralph Campbell <ralph.campbell@qlogic.com> | 2008-09-20 23:05:51 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-09-20 23:05:51 -0400 |
commit | 940358967599ba9057b3c51ba906e1cd5b984729 (patch) | |
tree | 6e29b978beddbcc843be676732156e0b31d317c0 /drivers/infiniband | |
parent | 9824b8f11373b0df806c135a342da9319ef1d893 (diff) |
IB/ipath: Fix SLID generation for RC/UC QPs when LMC > 0
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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_rc.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_ruc.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c index 97710522624d..7b93cda1a4bd 100644 --- a/drivers/infiniband/hw/ipath/ipath_rc.c +++ b/drivers/infiniband/hw/ipath/ipath_rc.c | |||
@@ -675,7 +675,8 @@ static void send_rc_ack(struct ipath_qp *qp) | |||
675 | hdr.lrh[0] = cpu_to_be16(lrh0); | 675 | hdr.lrh[0] = cpu_to_be16(lrh0); |
676 | hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); | 676 | hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); |
677 | hdr.lrh[2] = cpu_to_be16(hwords + SIZE_OF_CRC); | 677 | hdr.lrh[2] = cpu_to_be16(hwords + SIZE_OF_CRC); |
678 | hdr.lrh[3] = cpu_to_be16(dd->ipath_lid); | 678 | hdr.lrh[3] = cpu_to_be16(dd->ipath_lid | |
679 | qp->remote_ah_attr.src_path_bits); | ||
679 | ohdr->bth[0] = cpu_to_be32(bth0); | 680 | ohdr->bth[0] = cpu_to_be32(bth0); |
680 | ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); | 681 | ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); |
681 | ohdr->bth[2] = cpu_to_be32(qp->r_ack_psn & IPATH_PSN_MASK); | 682 | ohdr->bth[2] = cpu_to_be32(qp->r_ack_psn & IPATH_PSN_MASK); |
diff --git a/drivers/infiniband/hw/ipath/ipath_ruc.c b/drivers/infiniband/hw/ipath/ipath_ruc.c index af051f757663..fc0f6d9e6030 100644 --- a/drivers/infiniband/hw/ipath/ipath_ruc.c +++ b/drivers/infiniband/hw/ipath/ipath_ruc.c | |||
@@ -618,7 +618,8 @@ void ipath_make_ruc_header(struct ipath_ibdev *dev, struct ipath_qp *qp, | |||
618 | qp->s_hdr.lrh[0] = cpu_to_be16(lrh0); | 618 | qp->s_hdr.lrh[0] = cpu_to_be16(lrh0); |
619 | qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); | 619 | qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); |
620 | qp->s_hdr.lrh[2] = cpu_to_be16(qp->s_hdrwords + nwords + SIZE_OF_CRC); | 620 | qp->s_hdr.lrh[2] = cpu_to_be16(qp->s_hdrwords + nwords + SIZE_OF_CRC); |
621 | qp->s_hdr.lrh[3] = cpu_to_be16(dev->dd->ipath_lid); | 621 | qp->s_hdr.lrh[3] = cpu_to_be16(dev->dd->ipath_lid | |
622 | qp->remote_ah_attr.src_path_bits); | ||
622 | bth0 |= ipath_get_pkey(dev->dd, qp->s_pkey_index); | 623 | bth0 |= ipath_get_pkey(dev->dd, qp->s_pkey_index); |
623 | bth0 |= extra_bytes << 20; | 624 | bth0 |= extra_bytes << 20; |
624 | ohdr->bth[0] = cpu_to_be32(bth0 | (1 << 22)); | 625 | ohdr->bth[0] = cpu_to_be32(bth0 | (1 << 22)); |