From patchwork Wed Sep 13 23:04:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyrel Datwyler X-Patchwork-Id: 13383917 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A98AEE0213 for ; Thu, 14 Sep 2023 00:01:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233172AbjINABR (ORCPT ); Wed, 13 Sep 2023 20:01:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233161AbjINABO (ORCPT ); Wed, 13 Sep 2023 20:01:14 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C687CE4 for ; Wed, 13 Sep 2023 17:01:10 -0700 (PDT) Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38DNfT3W002623; Thu, 14 Sep 2023 00:01:06 GMT 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=TVKhozCDovhtAR1Lc5/rSQE0MeG1HjCejR3N9rx9llI=; b=NDN963hlibFH2C8WDWALRZ4clqZdyQEAMWky3gruDADRA3BQWjA66LNNAQagY6Z0HOoD SeDZ+1L9zb85IJmT+8+zXLWWgTR0C6NyYDcZVEEBS7aKMTHwAuT0OjDw1w7yoWnhaB1u eL32EL3ECssLNIk9GL2CZp/WlDJJbxZH3S1x3+2vrhyQMtaQuEkKlTyNyamtSI09B91a 8PxTIjkIJM4Zlcuz7xruRZQG2Wg58VAlkDlCob1glWQMXPXJho09oPRF3oBhJ+8Z+ApI yigkTVuIYNwvs3O02XWB4dIfcTSKN8/GG7Hz3chCFLqWByf0vSEB2KEgVeuuP6Bt4ndK fQ== Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t3kpfnm2a-8 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 00:01:06 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38DMEuBK011942; Wed, 13 Sep 2023 23:05:03 GMT Received: from smtprelay06.wdc07v.mail.ibm.com ([172.16.1.73]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3t15r2632q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Sep 2023 23:05:03 +0000 Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay06.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38DN52BK66912690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Sep 2023 23:05:02 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E982658061; Wed, 13 Sep 2023 23:05:01 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7D10E58043; Wed, 13 Sep 2023 23:05:01 +0000 (GMT) Received: from vios4361.aus.stglabs.ibm.com (unknown [9.3.43.61]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 13 Sep 2023 23:05:01 +0000 (GMT) From: Tyrel Datwyler To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, brking@linux.ibm.com, james.bottomley@hansenpartnership.com, Tyrel Datwyler , Brian King Subject: [PATCH 04/11] ibmvfc: fix erroneous use of rtas_busy_delay with hcall return code Date: Wed, 13 Sep 2023 18:04:50 -0500 Message-Id: <20230913230457.2575849-5-tyreld@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230913230457.2575849-1-tyreld@linux.ibm.com> References: <20230913230457.2575849-1-tyreld@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Tj2A_LTkEkxxJdclU8C5swL0ExVzjmmM X-Proofpoint-ORIG-GUID: Tj2A_LTkEkxxJdclU8C5swL0ExVzjmmM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-13_18,2023-09-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 phishscore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 clxscore=1015 adultscore=0 impostorscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309130195 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Commit 0217a272fe13 ("scsi: ibmvfc: Store return code of H_FREE_SUB_CRQ during cleanup") wrongly changed the busy loop check to use rtas_busy_delay() instead of H_BUSY and H_IS_LONG_BUSY(). The busy return codes for RTAS and hypercalls are not the same. Fix this issue by restoring the use of H_BUSY and H_IS_LONG_BUSY(). Fixes: 0217a272fe13 ("scsi: ibmvfc: Store return code of H_FREE_SUB_CRQ during cleanup") Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index f35fed60fdae..a2f6a9ba5955 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -5952,7 +5951,7 @@ static int ibmvfc_register_scsi_channel(struct ibmvfc_host *vhost, irq_failed: do { rc = plpar_hcall_norets(H_FREE_SUB_CRQ, vdev->unit_address, scrq->cookie); - } while (rtas_busy_delay(rc)); + } while (rc == H_BUSY || H_IS_LONG_BUSY(rc)); reg_failed: LEAVE; return rc;