Yes, good catch. I fixed it like this:
diff-tree 9efa84579338184e0139f1881f0a1b6ad0063fcc (from
52824b6b5fa0533e2b2adc9df396d0e9ff6fb02a)
Author: Roland Dreier <[EMAIL PROTECTED]>
Date: Thu Apr 20 09:34:46 2006 -0700
IB/mthca: Fix offset in query_gid method
GuidInfo records have 8 byte GUIDs in then, so an index should be
multiplied by 8 to get an offset. mthca_query_gid() was incorrectly
multiplying by 16.
Noticed by Leonid Keller <[EMAIL PROTECTED]>.
Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c
b/drivers/infiniband/hw/mthca/mthca_provider.c
index 565a24b..a2eae8a 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -306,7 +306,7 @@ static int mthca_query_gid(struct ib_dev
goto out;
}
- memcpy(gid->raw + 8, out_mad->data + (index % 8) * 16, 8);
+ memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8);
out:
kfree(in_mad);
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general