Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1486342pxb; Thu, 4 Mar 2021 12:35:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpVB8S1J4KylDg2cquOXGhMMDc7kFDBpb2QmEZxWCzPuF+EcCIfPQtVM1Calp9iEOCxQzZ X-Received: by 2002:a17:906:4d18:: with SMTP id r24mr6074899eju.493.1614890150395; Thu, 04 Mar 2021 12:35:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614890150; cv=none; d=google.com; s=arc-20160816; b=x/S8/zNMAolbC+0E74vGwN89tnI2j4Xp3YKPki1MYp+IRTFbBSIJgtzKQoZeznuMVN 7sTttgv71Y9pcF9C7CG2rBn0rIt88GQQ7OMlVxuk5kOMnNUH7bGlpV2a9Eh/8/83dHCU 4wjqk4aRjjSJ5k/xNQaXtYaf+UFDYd/9fGd5P5zk37ksIo1cNfEajNQYYT46P4kCaOAj VCcG14IsdPizOYcImtwnTKY7XJJEG9/XSWlFDyuEATMS0l+jSWA6RxQU3pWyP2bEyKYo MopkwKP/UpmVQLulfkoaZZrFMDtdK1X9C7wtQ5TGNjeoyHLZjuGU+YED/UBBWwzNwcJ+ k7Zw== 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=XPxG3FFgPXal80lLQGs7HdzL8g2BGCEdUKlMKFxA35E=; b=po3daxGeJWW8dEyKtqPjKXHHphfS9RsetdRmZLObDWq9YuzeFPbw/aqsNwkSVdTGi7 ZGhsZiHa0vTjr801YR9glDgH1rdvFC7iKKGSLzNlX5b1DnBGUlb/EUiC+b3HcJcdX2Dz JZKVbDjKK9YUq6a8ZWbmxBjoBQc0DFeHXOOYOPICjVut0n5aNcT9UlELRyAmvQWz5h62 OBBHypiWyxNSjScroRd8bG7W/FjJk2H20/QH5EyHl8vGTvEwu6gXHiMJqivPj32ixVUu BP/zT4yGT1b+xMy+u8aGQn2iN8pNNw9sfCqGhcFsy32dJEmgplinw2xRCaxtJdqDLtag NA5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=frj05sTF; 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 i5si160407ejh.313.2021.03.04.12.35.28; Thu, 04 Mar 2021 12:35:50 -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=frj05sTF; 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 S1351716AbhCCKqw (ORCPT + 99 others); Wed, 3 Mar 2021 05:46:52 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:14570 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1840111AbhCBXHJ (ORCPT ); Tue, 2 Mar 2021 18:07:09 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 122N4LsN144564; Tue, 2 Mar 2021 18:06:13 -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=XPxG3FFgPXal80lLQGs7HdzL8g2BGCEdUKlMKFxA35E=; b=frj05sTFNSV9IQoPI3MFMyWd24kPy+LTrSRDcIviNfMX8I0XBQKAnWyke3o/OGEF9LMs wguSOCmPWVrfjlxKRCrbUnKHvcWLbEs6iUwiyLrabOtLerVYhH2JOqcAULhiULw6lPHV xIs0ak0Lh4aGwMBCsfXN9VoUV7T7WGdjNwr0ylv+G1Q5+Cl2LUR1qzmDuUSMcPDDLEXx pXSXdHu6NFQZV4xkDxIyV6j+PkDCx0rxFIOl0hqR029VlF8QnOehCdG2OghCDsDvtfq/ SCglV0KfhGCXFtUlrX7oFomCx2mycnkNaFFAOQv6NhbiDb8OXSaB+Dvld0d4brWmc8UP JA== Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 371xp8g65n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Mar 2021 18:06:13 -0500 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 122N2qSj020006; Tue, 2 Mar 2021 23:05:48 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma01dal.us.ibm.com with ESMTP id 371qmubfk2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Mar 2021 23:05:48 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 122N5kJc22937996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Mar 2021 23:05:46 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 62A436E050; Tue, 2 Mar 2021 23:05:46 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 044916E04C; Tue, 2 Mar 2021 23:05:46 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 2 Mar 2021 23:05:45 +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 v5 3/5] ibmvfc: treat H_CLOSED as success during sub-CRQ registration Date: Tue, 2 Mar 2021 17:05:41 -0600 Message-Id: <20210302230543.9905-4-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210302230543.9905-1-tyreld@linux.ibm.com> References: <20210302230543.9905-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-03-02_08:2021-03-01,2021-03-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 phishscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 spamscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103020170 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: 3034ebe26389 ("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 d34e1a4f74d9..1d9f961715ca 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