Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp704021pxb; Thu, 25 Feb 2021 12:54:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6YdJJjCaAwfnfQqPPcA501zSzmFWkO3NVr+qXN08rlHUKgIrpm8jPo9X7qeCY6aaGJUKU X-Received: by 2002:a17:906:3fc3:: with SMTP id k3mr4616310ejj.522.1614286476489; Thu, 25 Feb 2021 12:54:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614286476; cv=none; d=google.com; s=arc-20160816; b=W2bH6qvQPr2CdB0sIme9qCUkiTgKYJMzsAH+Cv7qmgNlRyRuoHg1IgnmlReatR/e3E Bsw6hX6cW5Hb81SsRHNrnrhBD7Dv8suPdh5d6+hB1wiPHQ7s+Fx4o+48P+7lEQME5+Z6 i+rREfjry3rTYkLGGmytkybObPj0q+nqU4BChyVyEoft4kZOoHjqQevAm6Gxc5wpql/j Q6wJLxYePfawBQdGddifCbh5E4DvDJsEIp7yaTf00iD/E5HhVR8mQ+QQjXAe2ikMlcAL B8MflcgA/QPtaHCDPgkwgCmqvNCGigLn3cw/94+0R7cL9Xz8FIU54O/ynqWjaj/MuApA ASyw== 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=XNJPQ1yZpvnoSLRI/ZOLiz1GIbhHvMflJIZ/7VBGJS0=; b=S8WAgeH9USDwumF9HN48PnTg+jPpMZHy1yQBg2WmL4HgPobdzXpJ8yhcE+euTQFEBJ 4rqN/jIgK/SOiBRFoIwdiq9Dt021L4aDyNcVH84dUJF62eRr+F32HdDpGgti+iNOiapd tiJJng/V6iE1bEzrdNvvesYsJ3o3q/RLexIzNVL627t0vFdR+430AxIsPOWO4b4SbWVO IUSQkA4hOyI5Zv9+ze2ghD9owL+4Ei7uovznFaDgVfDE7jsBu3JcIbJo1eiYI27Scuwx cLUU583fZ6mCyg4k/czscV+CYSKuHBJRlBJxULjlI+RNuJ2+vItQBGOPqr+PELDAsCqv wdGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=UGtVdC8X; 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 26si4301639edw.488.2021.02.25.12.54.14; Thu, 25 Feb 2021 12:54:36 -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=UGtVdC8X; 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 S234418AbhBYUvP (ORCPT + 99 others); Thu, 25 Feb 2021 15:51:15 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:7026 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233556AbhBYUtP (ORCPT ); Thu, 25 Feb 2021 15:49:15 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11PKYt3w088882; Thu, 25 Feb 2021 15:48:30 -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=XNJPQ1yZpvnoSLRI/ZOLiz1GIbhHvMflJIZ/7VBGJS0=; b=UGtVdC8XM82Z7w0C4UX/FxS0N34w47iaDejuUUToXBETO7SmDj52sH+euY1KbfE5g4TD n1cDC1icOd66HuRs5wZzbTUu1UBZ/TojKeMMqVKwStMmmglHpd75NkNl2PPn12TWRDSG jfOng3tKh9v5vUA/Zrk5IohzYhkxkjwItOiyokKFOFjiOmIEK+PsTeE67xoC8UsdXjTL W8H5D8zcUTuv6YLpgztr840vIEft6UXsAPvmUPWWh/KjIOtnvseC6PEbDdLGSMU37zlC iG2PdXEBr6xZ5x5V7q9u8KLZry6LxDOdaNBIFymvYRR/Dp0VNOd6C/oIQa6EyRQXrgmS 0g== Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 36xjs0rthp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 15:48:30 -0500 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 11PKkvuf002739; Thu, 25 Feb 2021 20:48:29 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma02wdc.us.ibm.com with ESMTP id 36tt29hfg9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 20:48:29 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11PKmS0j38011362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Feb 2021 20:48:28 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EF6336E050; Thu, 25 Feb 2021 20:48:27 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A2D176E04E; Thu, 25 Feb 2021 20:48:27 +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 20:48:27 +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 v2 3/5] ibmvfc: treat H_CLOSED as success during sub-CRQ registration Date: Thu, 25 Feb 2021 14:48:22 -0600 Message-Id: <20210225204824.14570-4-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210225204824.14570-1-tyreld@linux.ibm.com> References: <20210225204824.14570-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_11:2021-02-24,2021-02-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 mlxlogscore=999 impostorscore=0 lowpriorityscore=0 mlxscore=0 spamscore=0 adultscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102250158 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 3dd20f383453..ba6fcf9cbc57 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