Commit 5acb9f68 authored by Sean Hefty's avatar Sean Hefty Committed by Linus Torvalds

[PATCH] IB: fix ib_find_cached_gid() port numbering

Fix ib_find_cached_gid() to return the correct port number relative to
the port numbering used by the device.
Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 27670f5c
......@@ -114,7 +114,7 @@ int ib_find_cached_gid(struct ib_device *device,
cache = device->cache.gid_cache[p];
for (i = 0; i < cache->table_len; ++i) {
if (!memcmp(gid, &cache->table[i], sizeof *gid)) {
*port_num = p;
*port_num = p + start_port(device);
if (index)
*index = i;
ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment