From patchwork Mon Nov 25 11:22:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?KO2VmeyDnSkg7J6l7J246recICjsu7Ttk6jthLDqs7XtlZnqs7wp?= X-Patchwork-Id: 13884832 Received: from SLXP216CU001.outbound.protection.outlook.com (mail-koreacentralazon11021074.outbound.protection.outlook.com [40.107.42.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7E4819CC32; Mon, 25 Nov 2024 11:22:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.42.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732533776; cv=fail; b=JjFdPKVyZ2qW9Gly2/W2tnUSaD2wqL2EVO5TPxQkf8U5P9JaMfxoun1xR2Bn1BDRhvrcPi9LMzxiVLeQ3pjUnpCYzjQFh4W5Fv/xWbPOHBBnRJ1JonZJpmH47Z07xsdx2oT7saeOXsKJGVkmKC1C0KpMSFGmLIiLEbymp1d1yxw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732533776; c=relaxed/simple; bh=BFTO88KVhI571jT9CSRefUo4BZo5yyZHw1PqYsfce+8=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=YVU7kodqb8wfXz6ElGsinTMNRm4SSm/L0RRkKuKx7IzZQXOEJqBPaS8TXG8j1z+MIHboTVKb5RiV/glDZc8R8tXfF+vfk3oIZ3f7Yl3OAg+SJ8/5DyzKCe0BXrym6URw6aW4veD2yvjKoJ9P+XyMvThhJITo1zH+DziXdxXE2gw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=unist.ac.kr; spf=pass smtp.mailfrom=unist.ac.kr; dkim=pass (1024-bit key) header.d=unist.ac.kr header.i=@unist.ac.kr header.b=QBVjMy31; arc=fail smtp.client-ip=40.107.42.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=unist.ac.kr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unist.ac.kr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=unist.ac.kr header.i=@unist.ac.kr header.b="QBVjMy31" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HPC1ARLSPmZXdQI1Zt08KlKhO3h9mv0JVNAIiq1fjI6Bx1Op9yJnmG3gYXRweAg6MPxuQgXt+D+7iOoXnQLKOaMf3tqcYpM8uydvX7BbT5jObnXdZyMJEAh9fyadcML1EdVCuHuxpcLyScy/Lbu2R6yqgPQpVOi+AOQ+Bv8ik1iGkFHzKjFg+ON00OO2TFu/LdU8am5uaCAHrRabBFEj9nyKCPyQ7Q5Xv2MFwM4s43FaPt8MvO6qvNMOVIiwyU+kqDP7f59eVhm8y+Pk2yXmV08WnC/+mAztqQmONBSf/IIPoJyMgwIv2WrD3eBXcACG9hLvS8hq0MrByxOjVYV2Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BFTO88KVhI571jT9CSRefUo4BZo5yyZHw1PqYsfce+8=; b=vegHr21u6u3JAtO8UKzL4iEY2OO44MZQ6HtDMUxlP/5rC8XLpujX0jOWXtGihmd7z1Arbt+aCiElab94Vl9rfsc8msaUAnIgwFg7yf7xlI+RJWe7+YBuKaCSRz4xj7V4bOuGwMrdBWLM0TlR4HAN00QA04MDK/jfLvhBpromsbRYw7wmm5lhBAzD5OQORliF0M48ijEf8tZsjOKvk9mSAuDqUu8WE/X4Qunnx4mNlhhaRvYrHXwpMV5qGH9xUbA1xQtHMbd76AcAJJF4xQc6ga5Fc2i8jA8cNlHTfXRL9pPGf4qdg2eSXx0nZyC6esK65zrTBQzHHi4oVD/tzO/oBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=unist.ac.kr; dmarc=pass action=none header.from=unist.ac.kr; dkim=pass header.d=unist.ac.kr; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unist.ac.kr; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BFTO88KVhI571jT9CSRefUo4BZo5yyZHw1PqYsfce+8=; b=QBVjMy31GuaSdIXm9bX4RRy82hZkF+F+nvtt2VO/2yDeIgpcMNcmlkUIuj0tC5kSVbNleHfB7Yx2osS3PhSzWfUk2qVg4jOzkHS3ky4tmaDNFGwkdLY8QEKTpTj+dev+9kjF9iz92Hsdh9qLqkiRChZq7BHxuRaJT32+n47pRU4= Received: from SE1P216MB2287.KORP216.PROD.OUTLOOK.COM (2603:1096:101:15d::5) by SE1P216MB1962.KORP216.PROD.OUTLOOK.COM (2603:1096:101:f6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 11:22:52 +0000 Received: from SE1P216MB2287.KORP216.PROD.OUTLOOK.COM ([fe80::abfa:51df:7a24:2f06]) by SE1P216MB2287.KORP216.PROD.OUTLOOK.COM ([fe80::abfa:51df:7a24:2f06%6]) with mapi id 15.20.8182.019; Mon, 25 Nov 2024 11:22:52 +0000 From: =?utf-8?b?KO2VmeyDnSkg7J6l7J246recICjsu7Ttk6jthLDqs7XtlZnqs7wp?= To: "James.Bottomley@HansenPartnership.com" , "martin.petersen@oracle.com" CC: "njavali@marvell.com" , "GR-QLogic-Storage-Upstream@marvell.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH RESEND] qla2xxx: Fix START_SP_W_RETRIES checks _rval with positive EAGAIN Thread-Topic: [PATCH RESEND] qla2xxx: Fix START_SP_W_RETRIES checks _rval with positive EAGAIN Thread-Index: AQHbPyxdEMDBr931Ik+cgvc9cEUEOA== Date: Mon, 25 Nov 2024 11:22:52 +0000 Message-ID: References: In-Reply-To: Accept-Language: ko-KR, en-US Content-Language: ko-KR X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=unist.ac.kr; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SE1P216MB2287:EE_|SE1P216MB1962:EE_ x-ms-office365-filtering-correlation-id: e5b3d542-8d70-44ec-513e-08dd0d438063 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|376014|1800799024|366016|41320700013|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?1mmIDjuKPOe1e3sTKzp1rgKp0JLyQt3?= =?utf-8?q?Kx3I4GxXJzGpKWgNvkdZAMYnfObomcibhge6efwygDfzwkEBhMZ7feKA4l9at5caW?= =?utf-8?q?+aB+EPrlTbFV06fI834iqov1ZEZ/ZT0SaDDDHwRc4evwo3DNdiC+1KM1D2Zim4lxk?= =?utf-8?q?Z6Cawl3oG9o0ro8Wr3qWcvdK+p5Qzf86Nfr74pQC9bgyuZPUwLiMRwKHPhP266a7T?= =?utf-8?q?0yHX3vN5BzCf3n8cIbgcOkdClFbyR4tJQmtiEPmqM/PWoQTVg6oH1qRc3IvF2O2LF?= =?utf-8?q?9wXbjOBVT1XQeL27ozbG1qqDQQfiLWMlaF+MdFLeHbX5VnYgEcxHxuhoWjLjXsQUy?= =?utf-8?q?/uk+uhxmV4iHv5hyYAAoyTG0q8SVzw/HOnLoz2YAPCAioQZgSq84/V6n2jt5h1WFL?= =?utf-8?q?Hsie8f9U1wXQZN1G8yl/3dETXqQV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MgeaNefypSPgP+zjNhBrOals0M/5Xz0?= =?utf-8?q?0zsC2vKuD1dtl0T7Z4AtFcS3Zg7tzH0ANg=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:ko;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SE1P216MB2287.KORP216.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(41320700013)(38070700018);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?tEVz4+p7jBosA8qdznR0W343IcXc?= =?utf-8?q?MK7tvnG/alrdSUJTM5Uxayvirdl37qeCM8h5elRayS6diwP6D9bcrCRbrx2tH2ruL?= =?utf-8?q?UKDkbt10u0qHyIpTpptK1NZWR0xuNqdiqo9JpXDwt1pT5K9j/QahoT6FOyUOxxMTm?= =?utf-8?q?Tn4PJhvGnwg9xI4YE8hl0pYjnz6Y/d5zU2ORHjxhWYVtqmTyZUhsAb3NglFBd8OdE?= =?utf-8?q?ftVtvkVCxlo0JsnO8TFtvD7OtWrx1cXpYeNxe4B2o7Ajrn6Mc5FXJ884shJhOzkeq?= =?utf-8?q?jbcgG/CCg8v+40j881s1J+Iaw682lSnY6Ds3R70OtesNhAL6BuuDPzOeZATioQYcr?= =?utf-8?q?xua3GZWMQjPSa/Ym/Qd9pxZgFxnpvOq6+H5oRitOfl55EtrU7VyvxLjTNGZKeHMy8?= =?utf-8?q?0LDUgCtmNIoApe40XjXi/GbOVYEbInDCaAJxzRUuXBjrvuGqkP8jP+dtfVsat6GtF?= =?utf-8?q?NUOWWwNV7CYDVpxTcxnoIpEVqS0VMzs+PkxXgGqjYYoLXXzyxiUMLqVT+s83HEm4z?= =?utf-8?q?3ycZkyiS1CW4AGoPIa39nwiDOkN4/g5o6ovPDBQTHHHhaIrN6hpMcb/50Xu7ZegXa?= =?utf-8?q?+MmMVC2sP0sUqIc0h+NggfHE3/MCc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dN1+Ln3pzaBmO4FnwOurRMkuNwXWEacm6JZi?= =?utf-8?q?JiXdTUY8uFF/?= Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: unist.ac.kr X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SE1P216MB2287.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: e5b3d542-8d70-44ec-513e-08dd0d438063 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Nov 2024 11:22:52.4049 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e8715ec0-6179-432a-a864-54ea4008adc2 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: viVyBiaUonnDJq8FHHNG49OMxYAEuGnwAzWi/Va4GC/IALqS5bT/sjTWa4NtFp0kLG29/KtKdcK1CsC2aYNfFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SE1P216MB1962 From 6f450e20d42c29c623654553831bcba74a566da4 Mon Sep 17 00:00:00 2001 From: Ingyu Jang Date: Mon, 25 Nov 2024 20:22:00 +0900 Subject: [PATCH RESEND] qla2xxx: Fix  START_SP_W_RETRIES checks _rval with positive  EAGAIN The START_SP_W_RETRIES macro incorrectly checked _rval with a positive EAGAIN, despite qla2x00_start_sp consistently returning -EAGAIN for retriable conditions. This mismatch could cause improper looping behavior, failing to retry as intended and potentially leading to unintended results in the system. This patch fixes the macro to handle EAGAIN as -EAGAIN, ensuring consistent error handling. This change prevents any potential misinterpretation that could introduce unexpected behavior. Signed-off-by: Ingyu Jang ---  drivers/scsi/qla2xxx/qla_init.c | 2 +-  1 file changed, 1 insertion(+), 1 deletion(-) -- 2.34.1 diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 31fc6a0eca3e..763bdcc47567 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -2063,7 +2063,7 @@ static void qla_marker_sp_done(srb_t *sp, int res)                          break; \                  } \                  _rval = qla2x00_start_sp(_sp); \ -               if (_rval == EAGAIN) \ +               if (_rval == -EAGAIN) \                          msleep(1); \                  else \                          break; \