Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp738713pxb; Thu, 25 Feb 2021 13:56:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVUxmmS5oEihM1r8mlPLuD5QLM6PH3q9vPa/EJFUzS9StVKOADgoN5x7KYGU1xynGShWAg X-Received: by 2002:a05:6402:304b:: with SMTP id bu11mr34491edb.157.1614290194775; Thu, 25 Feb 2021 13:56:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614290194; cv=none; d=google.com; s=arc-20160816; b=HPPPWUiHM63+kkEKXq5YXYHzmRRIinjaKrvBczNILi7Hrd2KWL71tK68y7YW8UolEK UcTtlGg81NxEgtzHJ4fiMVIg9zb1V8eK86T4lNvHFfooYFlRaqX4O9Pg2FEO/eYkjpis EFAVImuhZx/dRo9K7xXfmi83gPvrjg33pLZWZJwUG2G0mggW558hJQ/5UyZnBbOfFtW0 kWyOknvGbtwOV3VENFnGGiWnjkhK3bwkIT5RQ8KYoMTjE32iZJp1P9DETbpOYP4PP3qi xFno70pNKzSYgbZZbdDFpYuPH3s8R9ZM59eZOo65bk/DPlHXYAflA3nmLZYBaLKZ9YrP 5ApA== 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=mCOJ/LF7H2N6Fhn70L8rooW/K3heQAfkmSAPfOnUqA4=; b=B2Y0ZKTCXwV/9nCbx5yaatZQ0dyw5FBhFSeRaEevWGUUSU/Eclb8HP+NAVnEl4lJGV qA6X5rxQOw/GXylm6Z3nBi1WGype/9hYcY6R0vcanKAhEFj3eUYP6IJlSDsPj7euGPXg CruMm7LXXf345NiAmQYczJt0qhTaFbfLFDjlxmKCYhmb0sylLyQNdZQmGITw9ZO4zy+S 3+nPwVkvKT+2cVdeoy8EA3gC7HH5F9U7/JCGdCWHBW+Sal391Be/NxcX7jUIxUAeN87M SUMHStj07t2yU1TsS8Wwa0w0jjVHVqjqlTDt9FCWrniJy/jnDzOsnybgZ29lFrCy/AbD wa1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=R+Ss6lHE; 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 dn28si3981048edb.569.2021.02.25.13.56.12; Thu, 25 Feb 2021 13:56:34 -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=R+Ss6lHE; 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 S234521AbhBYVww (ORCPT + 99 others); Thu, 25 Feb 2021 16:52:52 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56174 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233404AbhBYVvt (ORCPT ); Thu, 25 Feb 2021 16:51:49 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11PLX3L4075529; Thu, 25 Feb 2021 16:51:02 -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=mCOJ/LF7H2N6Fhn70L8rooW/K3heQAfkmSAPfOnUqA4=; b=R+Ss6lHEgdGIADyvDhEyqEOs/rJIS2/mRx5t4SqzCLp1LlFZbza0rPEeNCXujabcOIgi JEAVhDJwHxUNycYb+ZRdrFpkUyCMtjT3zonnWIFBYZE95VWjas2vZamdeSKC8IudlPq+ XY/qa/61u1CEs5+dMtOj/s/Oc7wzOf5dPHWK5PP+MV44aRMxNuLBgVbx2dBCYOiFZZQh 5wKREwjNxGJLbaOjADyIXNGpSYuxPvQvbiC52OX0sbQ2BnbVDdUnLFVQ/K2gdEzG7y9O aqi1KQS44zyHXO8w3TQerEHJEuxR9IY8V8jQ/rsMFvmC7ir/ekIHkbS6u52x0FMl4uhq og== Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 36xh9953x3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 16:51:02 -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 11PLmQdi000847; Thu, 25 Feb 2021 21:51:01 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma04dal.us.ibm.com with ESMTP id 36tt2b494j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 21:51:01 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11PLoxJa16777688 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Feb 2021 21:51:00 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E02476E04E; Thu, 25 Feb 2021 21:50:59 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 84A996E056; Thu, 25 Feb 2021 21:50:59 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 25 Feb 2021 21:50:59 +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 v4 3/5] ibmvfc: treat H_CLOSED as success during sub-CRQ registration Date: Thu, 25 Feb 2021 15:50:55 -0600 Message-Id: <20210225215057.23020-4-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210225215057.23020-1-tyreld@linux.ibm.com> References: <20210225215057.23020-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 malwarescore=0 phishscore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 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 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