Commit f9e61929 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Roland Dreier

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: default avatarMichael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent b36f170b
...@@ -184,7 +184,7 @@ int mthca_read_ah(struct mthca_dev *dev, struct mthca_ah *ah, ...@@ -184,7 +184,7 @@ int mthca_read_ah(struct mthca_dev *dev, struct mthca_ah *ah,
ah->av->sl_tclass_flowlabel & cpu_to_be32(0xfffff); ah->av->sl_tclass_flowlabel & cpu_to_be32(0xfffff);
ib_get_cached_gid(&dev->ib_dev, ib_get_cached_gid(&dev->ib_dev,
be32_to_cpu(ah->av->port_pd) >> 24, be32_to_cpu(ah->av->port_pd) >> 24,
ah->av->gid_index, ah->av->gid_index % dev->limits.gid_table_len,
&header->grh.source_gid); &header->grh.source_gid);
memcpy(header->grh.destination_gid.raw, memcpy(header->grh.destination_gid.raw,
ah->av->dgid, 16); ah->av->dgid, 16);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment