Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp733814pxb; Thu, 25 Feb 2021 13:46:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQYm3JI8jVz0H3tm4wed6DiEfsVTu1uZz9ZAya8mMSDBJPHcGZHqil5ptPsaok51oFg4J+ X-Received: by 2002:a05:6402:510f:: with SMTP id m15mr43293edd.78.1614289579889; Thu, 25 Feb 2021 13:46:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614289579; cv=none; d=google.com; s=arc-20160816; b=ikKtf0jVrDOcuQXjJ8c8auTFOqMpomOCD9de/5qwnSduEaQdxjdnbPEdIY+3EbuR5c ST8F2xWLrRrQgkOiR0nIlI81Cfcbfh6B/j5EzGMGKdQBB5F9wkPuR4pwME7t4/rOiB64 6oNRoT3nEiwJW62eWiQ1n11NNI2oSstMtUSSrjqLDB8HkWovl5tvEcM0CEIffvOiD0ZQ wt2X/I/sM4e/rGEibihEzwKxktImc6+gR80vF3O1is09gkBX00ezq5mkXsgNTJjcC4wD 93rU5swr8lRwAQ+kiayVjwwTMnC2MYvsgQd0tDOYYxw4tQzqw+VZqRvKxG2JGdYmhhQk ++6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YR2b0XNcHpr80T6REAOYdflSCp6NFsYI7ZRR6q3xrFA=; b=XPc+NDcT9cyyo6Cb865zI5zK/x27CImo5/zgx1C/w4GHpautt8IBt8Kux3u48LDgu6 ab7jwt45h0sFx8I63WjYMXiuUwQroRfUNlYU8Ypi2hpjYLSUGA8qcFvtJ+gfpJRhx7KW PAEkKDRjTn+GqKO4ZIGfHU6QczJXq/tQnzIGkhrpWxyJj5W28ZSykK7WYhxW1pzHc6sI mcxpf7FkhTYNycw0j/daPK6Mrsm/AUIZtNaFq/vOCP9LCgLX/07MJXR4OnmQPfbotEhu qj8Qu/Qnjx2jN9q69CVn4AzY5U8spzVUce2k4dCx+bEzXTHChBCpNgRTMobRLUSdPG61 diXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=J6OCHu4j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si4133355ejn.375.2021.02.25.13.45.57; Thu, 25 Feb 2021 13:46:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=J6OCHu4j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232349AbhBYVoK (ORCPT + 99 others); Thu, 25 Feb 2021 16:44:10 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:11854 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233804AbhBYVn3 (ORCPT ); Thu, 25 Feb 2021 16:43:29 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11PLWbF9042111; Thu, 25 Feb 2021 16:42:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=YR2b0XNcHpr80T6REAOYdflSCp6NFsYI7ZRR6q3xrFA=; b=J6OCHu4j4euTgr13vPMUiOah5yZJr4W0pkMEmv+N9DFpfVR+TOrY041QwgtZmlYcHflR Pbx2IZmOwpT48o+xSMonNKQbQmQ0qewxp4QfICYs6EUomq6P01I3Ekyf2wU6B7X4n6Dy iYGZNYBbITox/MxVvt6pI92BSdZNRuwxxYQvsgvsM7Q9slwlUZutzkwbD8CX0wemZgsV xJwBo3mYbhK05hYKr7sp11n/XBoYKRp6NiMbeVXkzw8zetOrmxJt1ClkpwTOZwIPWyCq lxj+YKLZ9SH78Ozl0mJvHxTOFCCwzX3esUV8ojNSn57V0dldK4V0CMxW7/t6R0MQ6GFP LQ== Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0b-001b2d01.pphosted.com with ESMTP id 36xh8t4x8y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 16:42:43 -0500 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 11PLQVeI003513; Thu, 25 Feb 2021 21:42:43 GMT Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma04dal.us.ibm.com with ESMTP id 36tt2b474v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 21:42:43 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11PLgffN12910884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Feb 2021 21:42:41 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 59B3278060; Thu, 25 Feb 2021 21:42:41 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D07177805C; Thu, 25 Feb 2021 21:42:40 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 25 Feb 2021 21:42:40 +0000 (GMT) From: Tyrel Datwyler To: james.bottomley@hansenpartnership.com Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, brking@linux.ibm.com, Tyrel Datwyler Subject: [PATCH v3 3/5] ibmvfc: treat H_CLOSED as success during sub-CRQ registration Date: Thu, 25 Feb 2021 15:42:35 -0600 Message-Id: <20210225214237.22400-4-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210225214237.22400-1-tyreld@linux.ibm.com> References: <20210225214237.22400-1-tyreld@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-02-25_14:2021-02-24,2021-02-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 malwarescore=0 mlxscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102250163 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A non-zero return code for H_REG_SUB_CRQ is currently treated as a failure resulting in failing sub-CRQ setup. The case of H_CLOSED should not be treated as a failure. This return code translates to a successful sub-CRQ registration by the hypervisor, and is meant to communicate back that there is currently no partner VIOS CRQ connection established as of yet. This is a common occurrence during a disconnect where the client adapter can possibly come back up prior to the partner adapter. For non-zero return code from H_REG_SUB_CRQ treat a H_CLOSED as success so that sub-CRQs are successfully setup. Fixes: faacf8c5f1d5 ("ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 2cca55f2e464..274c5a1fac9c 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -5636,7 +5636,8 @@ static int ibmvfc_register_scsi_channel(struct ibmvfc_host *vhost, rc = h_reg_sub_crq(vdev->unit_address, scrq->msg_token, PAGE_SIZE, &scrq->cookie, &scrq->hw_irq); - if (rc) { + /* H_CLOSED indicates successful register, but no CRQ partner */ + if (rc && rc != H_CLOSED) { dev_warn(dev, "Error registering sub-crq: %d\n", rc); if (rc == H_PARAMETER) dev_warn_once(dev, "Firmware may not support MQ\n"); -- 2.27.0