diff options
author | Ursula Braun <ubraun@linux.ibm.com> | 2020-09-26 12:44:25 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-28 15:19:03 -0700 |
commit | 8caaccf521c160d231587091f1f5e8aef2dd0a5e (patch) | |
tree | d77bf9ff836bc76915cfc2280e3d3dbd74a93e42 /net/smc | |
parent | 201091ebb2a161a0e10aab36186690b332941f6a (diff) | |
download | linux-8caaccf521c160d231587091f1f5e8aef2dd0a5e.tar.bz2 |
net/smc: introduce CHID callback for ISM devices
With SMCD version 2 the CHIDs of ISM devices are needed for the
CLC handshake.
This patch provides the new callback to retrieve the CHID of an
ISM device.
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc')
-rw-r--r-- | net/smc/af_smc.c | 2 | ||||
-rw-r--r-- | net/smc/smc_core.h | 1 | ||||
-rw-r--r-- | net/smc/smc_ism.c | 5 | ||||
-rw-r--r-- | net/smc/smc_ism.h | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 8c1cde36adb8..f02ed74a28e6 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -566,6 +566,8 @@ static int smc_find_ism_device(struct smc_sock *smc, struct smc_init_info *ini) smc_pnet_find_ism_resource(smc->clcsock->sk, ini); if (!ini->ism_dev[0]) return SMC_CLC_DECL_NOSMCDDEV; + else + ini->ism_chid[0] = smc_ism_get_chid(ini->ism_dev[0]); return 0; } diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h index ec86084b0dfd..d33bcbc3238f 100644 --- a/net/smc/smc_core.h +++ b/net/smc/smc_core.h @@ -303,6 +303,7 @@ struct smc_init_info { /* SMC-D */ u64 ism_peer_gid[SMC_MAX_ISM_DEVS + 1]; struct smcd_dev *ism_dev[SMC_MAX_ISM_DEVS + 1]; + u16 ism_chid[SMC_MAX_ISM_DEVS + 1]; }; /* Find the connection associated with the given alert token in the link group. diff --git a/net/smc/smc_ism.c b/net/smc/smc_ism.c index 63c3dd5578bf..c5a5b70251b6 100644 --- a/net/smc/smc_ism.c +++ b/net/smc/smc_ism.c @@ -46,6 +46,11 @@ void smc_ism_get_system_eid(struct smcd_dev *smcd, u8 **eid) smcd->ops->get_system_eid(smcd, eid); } +u16 smc_ism_get_chid(struct smcd_dev *smcd) +{ + return smcd->ops->get_chid(smcd); +} + /* Set a connection using this DMBE. */ void smc_ism_set_conn(struct smc_connection *conn) { diff --git a/net/smc/smc_ism.h b/net/smc/smc_ism.h index 816d86361e1a..8048e09ddcf8 100644 --- a/net/smc/smc_ism.h +++ b/net/smc/smc_ism.h @@ -51,5 +51,6 @@ int smc_ism_write(struct smcd_dev *dev, const struct smc_ism_position *pos, void *data, size_t len); int smc_ism_signal_shutdown(struct smc_link_group *lgr); void smc_ism_get_system_eid(struct smcd_dev *dev, u8 **eid); +u16 smc_ism_get_chid(struct smcd_dev *dev); void smc_ism_init(void); #endif |