vserver 2.0 rc7
[linux-2.6.git] / drivers / infiniband / core / cache.c
index f70fbfa..3042360 100644 (file)
@@ -37,6 +37,8 @@
 #include <linux/errno.h>
 #include <linux/slab.h>
 
+#include <ib_cache.h>
+
 #include "core_priv.h"
 
 struct ib_pkey_cache {
@@ -112,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;