[openib-general] Re: bug loading mthca after cm

Roland Dreier roland at topspin.com
Mon Jan 24 10:45:04 PST 2005


    Sean> I haven't looked into this, but the problem appears to be
    Sean> caused by the CM trying to modify the port when mthca is
    Sean> loaded.  Loading in the opposite order avoids the issue.

I think the cap_mask_mutex was initialized too late.  This patch
(already committed) should fix the problem.

 - R.

--- linux-bk.orig/drivers/infiniband/hw/mthca/mthca_provider.c	2005-01-23 21:51:46.000000000 -0800
+++ linux-bk/drivers/infiniband/hw/mthca/mthca_provider.c	2005-01-24 10:39:12.623987624 -0800
@@ -634,6 +634,8 @@
 	dev->ib_dev.detach_mcast         = mthca_multicast_detach;
 	dev->ib_dev.process_mad          = mthca_process_mad;
 
+	init_MUTEX(&dev->cap_mask_mutex);
+
 	ret = ib_register_device(&dev->ib_dev);
 	if (ret)
 		return ret;
@@ -647,8 +649,6 @@
 		}
 	}
 
-	init_MUTEX(&dev->cap_mask_mutex);
-
 	return 0;
 }
 



More information about the general mailing list