Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp734086pxb; Thu, 25 Feb 2021 13:46:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzS8QruuliaLGuVZLxp9qmNSVWQxUf8JFS68jb3nlrDL57upaGFZ6kKVXSSuxDMtCre910 X-Received: by 2002:a17:907:2642:: with SMTP id ar2mr4805726ejc.145.1614289619359; Thu, 25 Feb 2021 13:46:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614289619; cv=none; d=google.com; s=arc-20160816; b=IqnmJJj5qMNuqm+TsCZOpRJ1abG2O+P4fk+RP7LeBDlvIMMQ/eLn939Tiq7BX+2CZr mt2DNoidEbQgpNrMUHiC9WysnJXdkVjncHFT/ft8bYD5JhGthAqN349uHwu+/qVuZBdo McmEllBXj60wyv2O2GnGLDg9W8frl+BxUrDYFcyKl71wx2Fw9ZfLvzLk42xNT4eAoPj1 sbnp6C8OHI8xO7RXVBkowT7Q9Lv7WBado7yLpPfNcSNzAaSEtrAdMSdT/ePppoL68AzD VlLlzV/4/fpQi8+mL6nFfKL6nRbt12riG2R/72GvW3Cgy0ME1aPQBx+t8DQCne9+S50Z /eGA== 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=aKcJolVr+gZGAJ6hZ9FRIBjsOoHYSXVjQH1jRz8u/ak=; b=kGv/YWL4Q5DTkca5BHoSVH/y9AdkTCNPohG2PuVRB9fXEYd/SaMX7ZtP1Rr2JZYvgy pHar2UHFH8YdKKQIS+tt7U41yoYwvbWb7bsqoGGIsaw9k86bqkHH6M+uUoBoBtgsk10I beLMkRoQyDtnQaK+gev+1IvFAe0Jl77pGkCbJOp0cPY5NqIicCq+IsytLguVYMTtYyNU QmkHUeY0lsnTQxSLQ8E1zEhLlmyBHr0HITO6EtqrzxWLTXKDcqkSIu60So+MJh6grJIQ NSldKFbx/nbkVntQpMJXJedRjT1XFJCko98mHYxZH/e4GnPnQFSjkUfarDjKKcOjU/JL Bkzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=UjrtBpo0; 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 w12si4269882edr.505.2021.02.25.13.46.36; Thu, 25 Feb 2021 13:46:59 -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=UjrtBpo0; 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 S233946AbhBYVof (ORCPT + 99 others); Thu, 25 Feb 2021 16:44:35 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:8678 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234354AbhBYVna (ORCPT ); Thu, 25 Feb 2021 16:43:30 -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 11PLY8XY090122; Thu, 25 Feb 2021 16:42:45 -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=aKcJolVr+gZGAJ6hZ9FRIBjsOoHYSXVjQH1jRz8u/ak=; b=UjrtBpo0Mdek0M67K37AIAGRwtN1hgF2q4Cj8fwdWbLvZXWeFdwbw3hPFPZYQ2CQ2rM8 QtOcSz5qHAN/gEYbmLN5A9+F4SljjUjx4ccMdVZ6vkkp2WmYRFXMWhii5M6Ei+f5s+kR 90xktp2h011rQ4J7klE5xJWeUWj6dnPXPV7NsTDZ8DcIEDeEwqN87r9j5bAd0M9vfD02 lZBD/8AQTx4qMBm3my1nSp22tEU9Xfvd8L0g5+35RTTmM/pmvCGxCswjmpNM7mXRewgc FeLfR8t4zCFQ5Pg7sdrAkaFcsIPLdHYz8CtH32F5m78So8u/86DLK7cpyWLrPz6/YXYc 8w== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 36xh8jvxhs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 16:42:44 -0500 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 11PLS0l8018596; Thu, 25 Feb 2021 21:42:44 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma03dal.us.ibm.com with ESMTP id 36v5y9mryf-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 b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11PLggFA28836288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Feb 2021 21:42:42 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F1FF37805E; 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 736947805C; Thu, 25 Feb 2021 21:42:41 +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:41 +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 4/5] ibmvfc: store return code of H_FREE_SUB_CRQ during cleanup Date: Thu, 25 Feb 2021 15:42:36 -0600 Message-Id: <20210225214237.22400-5-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 suspectscore=0 bulkscore=0 clxscore=1015 phishscore=0 malwarescore=0 priorityscore=1501 adultscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 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 The H_FREE_SUB_CRQ hypercall can return a retry delay return code that indicates the call needs to be retried after a specific amount of time delay. The error path to free a sub-CRQ in case of a failure during channel registration fails to capture the return code of H_FREE_SUB_CRQ which will result in the delay loop being skipped in the case of a retry delay return code. Store the return code result of the H_FREE_SUB_CRQ call such that the return code check in the delay loop evaluates a meaningful value. Also, use the rtas_busy_delay() to check the rc value and delay for the appropriate amount of time. Fixes: 9288d35d70b5 ("ibmvfc: map/request irq and register Sub-CRQ interrupt handler") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 274c5a1fac9c..1bb08e5f3674 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -5670,8 +5671,8 @@ static int ibmvfc_register_scsi_channel(struct ibmvfc_host *vhost, irq_failed: do { - plpar_hcall_norets(H_FREE_SUB_CRQ, vdev->unit_address, scrq->cookie); - } while (rc == H_BUSY || H_IS_LONG_BUSY(rc)); + rc = plpar_hcall_norets(H_FREE_SUB_CRQ, vdev->unit_address, scrq->cookie); + } while (rtas_busy_delay(rc)); reg_failed: ibmvfc_free_queue(vhost, scrq); LEAVE; -- 2.27.0