net/smc: separate function for link initialization
authorKarsten Graul <kgraul@linux.ibm.com>
Wed, 29 Apr 2020 15:10:38 +0000 (17:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Apr 2020 19:26:32 +0000 (12:26 -0700)
commitf3c1deddb21c19fb0eec3c61e80567ef4a79b58b
tree18455e9e33f02232611fae878bb0e273a1202dc2
parentfdff704dc60418e9a1bac78ae09c857d05c65aa3
net/smc: separate function for link initialization

Move the initialization of a new link into its own function, separate
from smc_lgr_create, to allow more than one link per link group.
Do an extra check if the IB device initialization was successful, and
reset the link state if any error occurs during smcr_link_init().
And rename two existing functions to use the prefix smcr_ to indicate
that they belong to the SMC-R code path.

Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Reviewed-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_core.c