Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp988330pxb; Wed, 3 Mar 2021 23:39:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJSxYDUpDFavb8fR4LQJ9HL83IDWB8v1rjMbreyGZJ3Dn8bRscXnGfaBRf6C3Egq18vsJa X-Received: by 2002:a05:6402:216:: with SMTP id t22mr2891054edv.168.1614843580739; Wed, 03 Mar 2021 23:39:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614843580; cv=none; d=google.com; s=arc-20160816; b=fid239UCQR4EmhOKbnyiwPOnnXWv+iAEyJ3rcthzlsZ0VDVZjsu712N9SrcDG/15Lg BAMZpwrZ6NaghlSsGK1VaFTBbGJZWhn9+JEoKGU+htwYkw228Sx8hfA9TMQYQWtMLl6w k3HqDhd+67y6DpvlRxJq0xlua2HVUMCBSJn+uYUlziWTuIJLFSkGiZBsUB5iKtu3VdiY 1z+CNuy2bW7mdI8hwxn5wDXnjTQz0w55Q09+tXaLROUvAKNIXLh31CvRo7vXMOUVEHfN 8CyIefU+vSh9tqrVotl+DO5VVqHR3UMgW1aF1hVlQ3m3jHvmI/VT4WiPHPy/vZX5/z9H dzTg== 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=mh59kqzS3Vta0WgtVShW7Y2yOas9L+oy4a7h3f2fbPk=; b=IS281dBQukevg5eC0M+n2KZx8KGVKFMDUykS6Kn5u8OT4vxHr9BUsCz/nEz1eiNhuV x+no1m4x4WwvyuNjLwWKJOagXGZzmLUvES7UPHyBPjbDW4W+XzR4slnIT97X7FgKjIVr 9mMhs8783GnIR3o7uIoYYVhWRGmijRJxwhpsuVmEBpzMYYjbHlFFxpQySaQxS+gVN0TX TphCZ8W+7menFvc3YWJal5WHywktHhFFz9po5hc3r8pGDUd3AzYEDb5SK/+SoezigPQ4 D8jaxIRW7Jt5QRYC3EWB5Un+dJe49Q/WbuDOUXkHzLb4DXZ4w6lcF1PwwoJo5ZvmJ4Ci unpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=tQZKdrq5; 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 bu8si16655819edb.349.2021.03.03.23.39.18; Wed, 03 Mar 2021 23:39:40 -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=tQZKdrq5; 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 S1356564AbhCCKrn (ORCPT + 99 others); Wed, 3 Mar 2021 05:47:43 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:29906 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1840160AbhCBXHw (ORCPT ); Tue, 2 Mar 2021 18:07:52 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 122N3ShX085219; Tue, 2 Mar 2021 18:07:05 -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=mh59kqzS3Vta0WgtVShW7Y2yOas9L+oy4a7h3f2fbPk=; b=tQZKdrq51BDN9mZQ96+PE/+LfmXaua2l78xv+25ftd1LtSiIsPWA/U+M5tcERiAJHIAN j+Xn76QrDlvjJS0b2PFOXy1ap1yLyZynOMAyBIkG0JyjCQ5wV3aP4L2gH/LkoE/WpJnj ku4I/IOtEQ96CpCrilmO0TBEXjGEGq7tgkP4T/zPnOQwFRpHoQP/OqGuOu7kQtSSdzee jJuDKWcF2esirY1i5mrhN/Y0MTordYoXD3CuL3iNVR333NwKXcNiZ5aBdEjmmph+rBFY /Ncm0IVJEVBK4CwUdQqS3rFdxXlxwqcuSuhhxWzSBWP7AVF0WpDs/1MGLYSr+/aoTBwF +Q== Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 371xmwrg4f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Mar 2021 18:07:04 -0500 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 122N2YNh011270; 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 ppma02dal.us.ibm.com with ESMTP id 3710sqpaxg-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 122N5kYI16384470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Mar 2021 23:05:47 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D3E8B6E04E; 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 758C96E056; 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:46 +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 4/5] ibmvfc: store return code of H_FREE_SUB_CRQ during cleanup Date: Tue, 2 Mar 2021 17:05:42 -0600 Message-Id: <20210302230543.9905-5-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 spamscore=0 suspectscore=0 adultscore=0 mlxscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 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 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: 39e461fddff0 ("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 1d9f961715ca..ef03fa559433 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