blob: a9e7931da20894e1fbef346d36cc5dac59d6fda6 [file] [log] [blame]
From 0490b698de8f1e4c3074ebb6030ed50e37909ecf Mon Sep 17 00:00:00 2001
From: Ursula Braun <ubraun@linux.ibm.com>
Date: Wed, 23 Oct 2019 15:44:06 +0200
Subject: [PATCH] net/smc: keep vlan_id for SMC-R in smc_listen_work()
commit ca5f8d2dd5229ccacdd5cfde1ce4d32b0810e454 upstream.
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: bc36d2fc93eb ("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>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 6fb3ad8b4bdc..fe4bdec855be 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -1307,8 +1307,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) {
--
2.7.4