diff options
author | Wen Gu <guwen@linux.alibaba.com> | 2024-04-28 14:07:28 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-04-30 13:24:48 +0200 |
commit | 784c46f5467c3cd516e518de211e26611da5c0fb (patch) | |
tree | c742e6d8fe17d48e38d5251c8b349c36d73e509b /net/smc | |
parent | e5c5f3596de224422561d48eba6ece5210d967b3 (diff) | |
download | linux-stable-784c46f5467c3cd516e518de211e26611da5c0fb.tar.gz linux-stable-784c46f5467c3cd516e518de211e26611da5c0fb.tar.bz2 linux-stable-784c46f5467c3cd516e518de211e26611da5c0fb.zip |
net/smc: decouple ism_client from SMC-D DMB registration
The struct 'ism_client' is specialized for s390 platform firmware ISM.
So replace it with 'void' to make SMCD DMB registration helper generic
for both Emulated-ISM and existing ISM.
Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>
Reviewed-and-tested-by: Jan Karcher <jaka@linux.ibm.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/smc')
-rw-r--r-- | net/smc/smc_ism.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/smc/smc_ism.c b/net/smc/smc_ism.c index ac88de2a06a0..051726586730 100644 --- a/net/smc/smc_ism.c +++ b/net/smc/smc_ism.c @@ -222,7 +222,6 @@ int smc_ism_unregister_dmb(struct smcd_dev *smcd, struct smc_buf_desc *dmb_desc) int smc_ism_register_dmb(struct smc_link_group *lgr, int dmb_len, struct smc_buf_desc *dmb_desc) { -#if IS_ENABLED(CONFIG_ISM) struct smcd_dmb dmb; int rc; @@ -231,7 +230,7 @@ int smc_ism_register_dmb(struct smc_link_group *lgr, int dmb_len, dmb.sba_idx = dmb_desc->sba_idx; dmb.vlan_id = lgr->vlan_id; dmb.rgid = lgr->peer_gid.gid; - rc = lgr->smcd->ops->register_dmb(lgr->smcd, &dmb, &smc_ism_client); + rc = lgr->smcd->ops->register_dmb(lgr->smcd, &dmb, lgr->smcd->client); if (!rc) { dmb_desc->sba_idx = dmb.sba_idx; dmb_desc->token = dmb.dmb_tok; @@ -240,9 +239,6 @@ int smc_ism_register_dmb(struct smc_link_group *lgr, int dmb_len, dmb_desc->len = dmb.dmb_len; } return rc; -#else - return 0; -#endif } static int smc_nl_handle_smcd_dev(struct smcd_dev *smcd, @@ -446,6 +442,7 @@ static void smcd_register_dev(struct ism_dev *ism) if (!smcd) return; smcd->priv = ism; + smcd->client = &smc_ism_client; ism_set_priv(ism, &smc_ism_client, smcd); if (smc_pnetid_by_dev_port(&ism->pdev->dev, 0, smcd->pnetid)) smc_pnetid_by_table_smcd(smcd); |