diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-05-01 10:40:23 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-05-01 10:40:23 -0700 |
commit | 254abfd33a214617deb916585b306faee834c97f (patch) | |
tree | a926e60a3733a24e5e666d9e21877813f34e1228 /drivers/infiniband/hw/mthca/mthca_provider.c | |
parent | 1f4a90670bacbf61f2fcc19a9e0e78748c932a25 (diff) | |
download | linux-254abfd33a214617deb916585b306faee834c97f.tar.gz linux-254abfd33a214617deb916585b306faee834c97f.tar.bz2 linux-254abfd33a214617deb916585b306faee834c97f.zip |
IB/mthca: Fix offset in query_gid method
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>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_provider.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_provider.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index 565a24b1756f..a2eae8a30167 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_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); |