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>
This commit is contained in:
committed by
Roland Dreier
parent
2439a6e65f
commit
c1a0b23bf4
@@ -361,7 +361,7 @@ static int ipoib_mcast_sendonly_join(struct ipoib_mcast *mcast)
|
||||
|
||||
init_completion(&mcast->done);
|
||||
|
||||
ret = ib_sa_mcmember_rec_set(priv->ca, priv->port, &rec,
|
||||
ret = ib_sa_mcmember_rec_set(&ipoib_sa_client, priv->ca, priv->port, &rec,
|
||||
IB_SA_MCMEMBER_REC_MGID |
|
||||
IB_SA_MCMEMBER_REC_PORT_GID |
|
||||
IB_SA_MCMEMBER_REC_PKEY |
|
||||
@@ -485,9 +485,9 @@ static void ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast,
|
||||
|
||||
init_completion(&mcast->done);
|
||||
|
||||
ret = ib_sa_mcmember_rec_set(priv->ca, priv->port, &rec, comp_mask,
|
||||
mcast->backoff * 1000, GFP_ATOMIC,
|
||||
ipoib_mcast_join_complete,
|
||||
ret = ib_sa_mcmember_rec_set(&ipoib_sa_client, priv->ca, priv->port,
|
||||
&rec, comp_mask, mcast->backoff * 1000,
|
||||
GFP_ATOMIC, ipoib_mcast_join_complete,
|
||||
mcast, &mcast->query);
|
||||
|
||||
if (ret < 0) {
|
||||
@@ -528,7 +528,7 @@ void ipoib_mcast_join_task(void *dev_ptr)
|
||||
priv->local_rate = attr.active_speed *
|
||||
ib_width_enum_to_int(attr.active_width);
|
||||
} else
|
||||
ipoib_warn(priv, "ib_query_port failed\n");
|
||||
ipoib_warn(priv, "ib_query_port failed\n");
|
||||
}
|
||||
|
||||
if (!priv->broadcast) {
|
||||
@@ -681,7 +681,7 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast)
|
||||
* Just make one shot at leaving and don't wait for a reply;
|
||||
* if we fail, too bad.
|
||||
*/
|
||||
ret = ib_sa_mcmember_rec_delete(priv->ca, priv->port, &rec,
|
||||
ret = ib_sa_mcmember_rec_delete(&ipoib_sa_client, priv->ca, priv->port, &rec,
|
||||
IB_SA_MCMEMBER_REC_MGID |
|
||||
IB_SA_MCMEMBER_REC_PORT_GID |
|
||||
IB_SA_MCMEMBER_REC_PKEY |
|
||||
|
Reference in New Issue
Block a user