aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@mellanox.co.il>2006-01-21 17:02:59 -0500
committerRoland Dreier <rolandd@cisco.com>2006-01-21 17:02:59 -0500
commitf9e61929e5e1dacc2afefbde6abc3e6571ca2887 (patch)
treee54745b6a461d8217afa2e4e063985c2fc344679 /drivers/infiniband/hw/mthca
parentb36f170b617a7cd147b694dabf504e856a50ee9d (diff)
IB/mthca: Use correct GID in MADs sent on port 2
mthca_create_ah() includes the port number in the GID index. The reverse needs to be done in mthca_read_ah(). Noted by Hal Rosenstock. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_av.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c
index a14eed08a0fc..a19e0ed03d7c 100644
--- a/drivers/infiniband/hw/mthca/mthca_av.c
+++ b/drivers/infiniband/hw/mthca/mthca_av.c
@@ -184,7 +184,7 @@ int mthca_read_ah(struct mthca_dev *dev, struct mthca_ah *ah,
184 ah->av->sl_tclass_flowlabel & cpu_to_be32(0xfffff); 184 ah->av->sl_tclass_flowlabel & cpu_to_be32(0xfffff);
185 ib_get_cached_gid(&dev->ib_dev, 185 ib_get_cached_gid(&dev->ib_dev,
186 be32_to_cpu(ah->av->port_pd) >> 24, 186 be32_to_cpu(ah->av->port_pd) >> 24,
187 ah->av->gid_index, 187 ah->av->gid_index % dev->limits.gid_table_len,
188 &header->grh.source_gid); 188 &header->grh.source_gid);
189 memcpy(header->grh.destination_gid.raw, 189 memcpy(header->grh.destination_gid.raw,
190 ah->av->dgid, 16); 190 ah->av->dgid, 16);