]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/smc: keep vlan_id for SMC-R in smc_listen_work()
authorUrsula Braun <ubraun@linux.ibm.com>
Wed, 23 Oct 2019 13:44:06 +0000 (15:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Oct 2019 02:18:21 +0000 (19:18 -0700)
Creating of an SMC-R connection with vlan-id fails, because
smc_listen_work() determines the vlan_id of the connection,
saves it in struct smc_init_info ini, but clears the ini area
again if SMC-D is not applicable.
This patch just resets the ISM device before investigating
SMC-R availability.

Fixes: 83006418efee ("net/smc: consolidate function parameters")
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>
net/smc/af_smc.c

index d9566e84f2f920da62cef9069759e5650ee71cb8..cea3c36ea0da6ed07d9375a0e1ac4dd27317132b 100644 (file)
@@ -1298,8 +1298,8 @@ static void smc_listen_work(struct work_struct *work)
        /* check if RDMA is available */
        if (!ism_supported) { /* SMC_TYPE_R or SMC_TYPE_B */
                /* prepare RDMA check */
-               memset(&ini, 0, sizeof(ini));
                ini.is_smcd = false;
+               ini.ism_dev = NULL;
                ini.ib_lcl = &pclc->lcl;
                rc = smc_find_rdma_device(new_smc, &ini);
                if (rc) {