From: Sean Hefty <[EMAIL PROTECTED]>

Fix ib_find_cached_gid() to return the correct port number relative to
the port numbering used by the device.

Signed-off-by: Sean Hefty <[EMAIL PROTECTED]>
Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>

--- linux-export.orig/drivers/infiniband/core/cache.c   2005-03-02 
20:53:21.000000000 -0800
+++ linux-export/drivers/infiniband/core/cache.c        2005-03-03 
15:02:57.180310444 -0800
@@ -114,7 +114,7 @@
                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;

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to