提交 254abfd3 编写于 作者: R Roland Dreier

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: NRoland Dreier <rolandd@cisco.com>
上级 1f4a9067
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册