aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_main.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@mellanox.co.il>2006-08-21 19:40:12 -0400
committerRoland Dreier <rolandd@cisco.com>2006-09-22 18:22:53 -0400
commitc1a0b23bf477c2e1068905f4e2b5c3cee139e853 (patch)
tree68357e32e8b6542647f639da8ca3859b4cb3b59b /drivers/infiniband/ulp/ipoib/ipoib_main.c
parent2439a6e65ff09729c3b4215f134dc5cd4e8a30c0 (diff)
IB/sa: Require SA registration
Require users to register with SA module, to prevent the sa_query module text from going away while an SA query callback is still running. Update all in-tree users for the new interface. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_main.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index e9a7659eb1d7..ae3a4982cddb 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -82,6 +82,8 @@ static const u8 ipv4_bcast_addr[] = {
82 82
83struct workqueue_struct *ipoib_workqueue; 83struct workqueue_struct *ipoib_workqueue;
84 84
85struct ib_sa_client ipoib_sa_client;
86
85static void ipoib_add_one(struct ib_device *device); 87static void ipoib_add_one(struct ib_device *device);
86static void ipoib_remove_one(struct ib_device *device); 88static void ipoib_remove_one(struct ib_device *device);
87 89
@@ -463,7 +465,7 @@ static int path_rec_start(struct net_device *dev,
463 init_completion(&path->done); 465 init_completion(&path->done);
464 466
465 path->query_id = 467 path->query_id =
466 ib_sa_path_rec_get(priv->ca, priv->port, 468 ib_sa_path_rec_get(&ipoib_sa_client, priv->ca, priv->port,
467 &path->pathrec, 469 &path->pathrec,
468 IB_SA_PATH_REC_DGID | 470 IB_SA_PATH_REC_DGID |
469 IB_SA_PATH_REC_SGID | 471 IB_SA_PATH_REC_SGID |
@@ -1191,13 +1193,16 @@ static int __init ipoib_init_module(void)
1191 goto err_fs; 1193 goto err_fs;
1192 } 1194 }
1193 1195
1196 ib_sa_register_client(&ipoib_sa_client);
1197
1194 ret = ib_register_client(&ipoib_client); 1198 ret = ib_register_client(&ipoib_client);
1195 if (ret) 1199 if (ret)
1196 goto err_wq; 1200 goto err_sa;
1197 1201
1198 return 0; 1202 return 0;
1199 1203
1200err_wq: 1204err_sa:
1205 ib_sa_unregister_client(&ipoib_sa_client);
1201 destroy_workqueue(ipoib_workqueue); 1206 destroy_workqueue(ipoib_workqueue);
1202 1207
1203err_fs: 1208err_fs:
@@ -1209,6 +1214,7 @@ err_fs:
1209static void __exit ipoib_cleanup_module(void) 1214static void __exit ipoib_cleanup_module(void)
1210{ 1215{
1211 ib_unregister_client(&ipoib_client); 1216 ib_unregister_client(&ipoib_client);
1217 ib_sa_unregister_client(&ipoib_sa_client);
1212 ipoib_unregister_debugfs(); 1218 ipoib_unregister_debugfs();
1213 destroy_workqueue(ipoib_workqueue); 1219 destroy_workqueue(ipoib_workqueue);
1214} 1220}