[openib-general] [PATCH] mthca: fix sgid for port 2 mad
Michael S. Tsirkin
mst at mellanox.co.il
Wed Jan 18 01:13:13 PST 2006
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 at mellanox.co.il>
Index: openib/drivers/infiniband/hw/mthca/mthca_av.c
===================================================================
--- openib.orig/drivers/infiniband/hw/mthca/mthca_av.c 2006-01-14 18:40:12.000000000 +0200
+++ openib/drivers/infiniband/hw/mthca/mthca_av.c 2006-01-18 02:35:18.000000000 +0200
@@ -182,7 +182,7 @@ int mthca_read_ah(struct mthca_dev *dev,
ah->av->sl_tclass_flowlabel & cpu_to_be32(0xfffff);
ib_get_cached_gid(&dev->ib_dev,
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);
memcpy(header->grh.destination_gid.raw,
ah->av->dgid, 16);
--
MST
More information about the general
mailing list