diff options
author | Alex Estrin <alex.estrin@intel.com> | 2018-02-01 19:55:41 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-02-01 23:43:31 +0100 |
commit | 1029361084d18cc270f64dfd39529fafa10cfe01 (patch) | |
tree | f5d35e3c2493f5e28ad4f82df5b4ca641d152fa1 /drivers/infiniband | |
parent | IB/hfi1: Show fault stats in both TX and RX directions (diff) | |
download | linux-1029361084d18cc270f64dfd39529fafa10cfe01.tar.xz linux-1029361084d18cc270f64dfd39529fafa10cfe01.zip |
IB/ipoib: Fix for potential no-carrier state
On reboot SM can program port pkey table before ipoib registered its
event handler, which could result in missing pkey event and leave root
interface with initial pkey value from index 0.
Since OPA port starts with invalid pkey in index 0, root interface will
fail to initialize and stay down with no-carrier flag.
For IB ipoib interface may end up with pkey different from value
opensm put in pkey table idx 0, resulting in connectivity issues
(different mcast groups, for example).
Close the window by calling event handler after registration
to make sure ipoib pkey is in sync with port pkey table.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Alex Estrin <alex.estrin@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 5930c7d9a8fb..161ba8c76285 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -2306,6 +2306,9 @@ static struct net_device *ipoib_add_port(const char *format, priv->ca, ipoib_event); ib_register_event_handler(&priv->event_handler); + /* call event handler to ensure pkey in sync */ + queue_work(ipoib_workqueue, &priv->flush_heavy); + result = register_netdev(priv->dev); if (result) { pr_warn("%s: couldn't register ipoib port %d; error %d\n", |