diff options
author | Erez Shitrit <erezsh@mellanox.com> | 2014-07-08 12:45:11 +0300 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-08-05 07:47:33 -0700 |
commit | db84f88037592f069f5c1fc7f6b00ae6f5eb2e84 (patch) | |
tree | b6819e0ba4e3583e98fce535e2abe6c80300255c /drivers/infiniband/ulp/ipoib/ipoib_main.c | |
parent | e316453301f02bfcaabcb86e628f3dbef2e96c7e (diff) | |
download | op-kernel-dev-db84f88037592f069f5c1fc7f6b00ae6f5eb2e84.zip op-kernel-dev-db84f88037592f069f5c1fc7f6b00ae6f5eb2e84.tar.gz |
IB/ipoib: Use P_Key change event instead of P_Key polling mechanism
The current code use a dedicated polling logic to determine when the P_Key
assigned to the ipoib device is present in HCA port table and act accordingly.
Move to use the code which acts upon getting PKEY_CHANGE event to handle this
task and remove the P_Key polling logic/thread as they add extra complexity
which isn't needed.
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Acked-by: Alex Estrin <alex.estrin@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_main.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 5786a78..35acbd4 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -108,7 +108,10 @@ int ipoib_open(struct net_device *dev) set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags); - if (ipoib_pkey_dev_delay_open(dev)) + + ipoib_pkey_dev_check_presence(dev); + + if (!test_bit(IPOIB_PKEY_ASSIGNED, &priv->flags)) return 0; if (ipoib_ib_dev_open(dev)) @@ -1379,7 +1382,6 @@ void ipoib_setup(struct net_device *dev) INIT_LIST_HEAD(&priv->dead_ahs); INIT_LIST_HEAD(&priv->multicast_list); - INIT_DELAYED_WORK(&priv->pkey_poll_task, ipoib_pkey_poll); INIT_DELAYED_WORK(&priv->mcast_task, ipoib_mcast_join_task); INIT_WORK(&priv->carrier_on_task, ipoib_mcast_carrier_on_task); INIT_WORK(&priv->flush_light, ipoib_ib_dev_flush_light); |