projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f4a906
)
IB/mthca: Fix offset in query_gid method
author
Roland Dreier
<rolandd@cisco.com>
Mon, 1 May 2006 17:40:23 +0000
(10:40 -0700)
committer
Roland Dreier
<rolandd@cisco.com>
Mon, 1 May 2006 17:40:23 +0000
(10:40 -0700)
GuidInfo records have 8 byte GUIDs in them, so an index should be
multiplied by 8 to get an offset. mthca_query_gid() was incorrectly
multiplying by 16.
Noticed by Leonid Keller <leonid@mellanox.co.il>.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_provider.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/mthca/mthca_provider.c
b/drivers/infiniband/hw/mthca/mthca_provider.c
index 565a24b1756f10647688e0ffb3b70a5b948160c6..a2eae8a30167e3d9cc076b6885028c54485a8285 100644
(file)
--- 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_device *ibdev, u8 port,
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);