Skip to content

Commit cabf4ef

Browse files
alexestrgregkh
authored andcommitted
IB/ipoib: Fix for potential no-carrier state
[ Upstream commit 1029361 ] 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 <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Alex Estrin <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7a9e41c commit cabf4ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/infiniband/ulp/ipoib/ipoib_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,9 @@ static struct net_device *ipoib_add_port(const char *format,
19531953
goto event_failed;
19541954
}
19551955

1956+
/* call event handler to ensure pkey in sync */
1957+
queue_work(ipoib_workqueue, &priv->flush_heavy);
1958+
19561959
result = register_netdev(priv->dev);
19571960
if (result) {
19581961
printk(KERN_WARNING "%s: couldn't register ipoib port %d; error %d\n",

0 commit comments

Comments
 (0)