From patchwork Tue Aug 1 11:40:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 13336562 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 8797CC04A94 for ; Tue, 1 Aug 2023 11:41:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234334AbjHALlT (ORCPT ); Tue, 1 Aug 2023 07:41:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234324AbjHALlR (ORCPT ); Tue, 1 Aug 2023 07:41:17 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59D1410FD for ; Tue, 1 Aug 2023 04:41:15 -0700 (PDT) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 371AL6j2013837 for ; Tue, 1 Aug 2023 04:41:15 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=cA7+SIw5lLapA0N93ReIXhNLXXIrwtnd5lyZReNtmno=; b=D7FShFbHcXkA/qsamU1URmA0Rd8kk060JkaNNoVF7p0sgcEEeY2QhipgGQsGzLu+hEgh 77KPTqSj/C6YIoQMX7+SpCoJOdbZ0NJvKIDna0XzHYBJU8eOxiNjDem02OMfRNjg+/D0 pvFmFdSBuu/Hi7YRiB9YJMf/MAPws0nf6ZMInKe/7ac71ocscMm9ueXDK1MJd8hx1CzA xBN7Wux1W32JzLUgrQah0HQwfbwuWzXNRfQOgexV9Lfg/qlZb4cucgeCuIfs2hL+coCs RmMXElAyZaHcYKRbtmcQ4NoamqkQJDP633WGP0dv8/HDdlxcIu9Tik+xP9od0EERolNT aQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3s707dg82q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 01 Aug 2023 04:41:15 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 1 Aug 2023 04:41:13 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 1 Aug 2023 04:41:13 -0700 Received: from localhost.marvell.com (unknown [10.30.46.195]) by maili.marvell.com (Postfix) with ESMTP id 3BE393F7048; Tue, 1 Aug 2023 04:41:10 -0700 (PDT) From: Nilesh Javali To: CC: , , , Subject: [PATCH 05/10] qla2xxx: Error code did not return to upper layer Date: Tue, 1 Aug 2023 17:10:52 +0530 Message-ID: <20230801114057.27039-6-njavali@marvell.com> X-Mailer: git-send-email 2.23.1 In-Reply-To: <20230801114057.27039-1-njavali@marvell.com> References: <20230801114057.27039-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: IBf14NZNejMwYy289iWmH9E54WzbBkSQ X-Proofpoint-ORIG-GUID: IBf14NZNejMwYy289iWmH9E54WzbBkSQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-01_06,2023-08-01_01,2023-05-22_02 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran TMF was returned with an error code. The error code was not preserved to be returned to upper layer. Instead, the error code from the Marker was returned. Preserve error code from TMF and return it to upper layer. Cc: stable@vger.kernel.org Fixes: da7c21b72aa8 ("scsi: qla2xxx: Fix command flush during TMF") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 7faf2109228e..3ab90c159034 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -2223,6 +2223,8 @@ __qla2x00_async_tm_cmd(struct tmf_arg *arg) rval = QLA_FUNCTION_FAILED; } } + if (tm_iocb->u.tmf.data) + rval = tm_iocb->u.tmf.data; done_free_sp: /* ref: INIT */