From patchwork Thu Feb 2 00:58:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9550939 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D9B2460236 for ; Thu, 2 Feb 2017 00:59:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4B662844A for ; Thu, 2 Feb 2017 00:59:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B98722845B; Thu, 2 Feb 2017 00:59:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D69F2844A for ; Thu, 2 Feb 2017 00:59:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751373AbdBBA7h (ORCPT ); Wed, 1 Feb 2017 19:59:37 -0500 Received: from mail-dm3nam03on0082.outbound.protection.outlook.com ([104.47.41.82]:63328 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751393AbdBBA7W (ORCPT ); Wed, 1 Feb 2017 19:59:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=v1HJPuUDeJwcFN61c2OXp7hXZ5UMFefFQZytNQdQUzY=; b=RWk3aNhfTQlWP8JgWmb5clzJkU1St2iDXrycOqBVit4O+y5LZt6IzKfrM6qJaGwtoy4VoFwi3rwB3AvbXZzwJXD5FXpd1EuBDj3/IgwBqUwhBbFdkMs/yyPVzhALHXwJ0eZwlUVrSxXYyd1YmjTG2QSgSs2WV+RHzp/UG7BP1sA= Received: from BN1PR02CA0026.namprd02.prod.outlook.com (10.141.56.26) by SN1PR02MB1421.namprd02.prod.outlook.com (10.162.0.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12; Thu, 2 Feb 2017 00:59:04 +0000 Received: from BL2FFO11FD053.protection.gbl (2a01:111:f400:7c09::126) by BN1PR02CA0026.outlook.office365.com (2a01:111:e400:2a::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16 via Frontend Transport; Thu, 2 Feb 2017 00:59:04 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; lst.de; dkim=none (message not signed) header.d=none;lst.de; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by BL2FFO11FD053.mail.protection.outlook.com (10.173.161.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.2 via Frontend Transport; Thu, 2 Feb 2017 00:59:03 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 8A.BC.01420.D0282985; Wed, 1 Feb 2017 16:49:18 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Wed, 1 Feb 2017 16:58:57 -0800 X-AuditID: 0ac94371-7ee9b9800001058c-9e-5892820d0854 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id AD.63.16817.15482985; Wed, 1 Feb 2017 16:58:57 -0800 (PST) From: Bart Van Assche To: Bart Van Assche CC: , Christoph Hellwig , "Himanshu Madhani" , Giridhar Malavali Subject: [PATCH v2 12/36] tcm_qla2xxx: Let the target core look up the LUN of the aborted cmd Date: Wed, 1 Feb 2017 16:58:29 -0800 Message-ID: <20170202005853.23456-13-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170202005853.23456-1-bart.vanassche@sandisk.com> References: <20170202005853.23456-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrILMWRmVeSWpSXmKPExsXCddJ5kS5f06QIg7M9PBZ7Hpxjs1i5+iiT xYU93YwWrUvfMjmweMz4vYjFY/fNBjaPz5vkApijuGxSUnMyy1KL9O0SuDI+75vIVLBav2L6 MqMGxonqXYycHBICJhLXO9pYuhi5OIQEljJJvJ+xhxUkISSwlVGiY00wTNGNHUtYIYo2M0pc PtzNCJJgEzCS+PZ+JguILSJgIPG79wIjSBGzwApGif/tj5hBEsICsRJ7LkxkB7FZBFQkTr6+ A9bMK+Ag0fbjEgvEBnmJXW0XwTZzAsUXH4cYKiRgL/Htz1Gw8yQE/rFIHDp4GKpZUOLkzCdg RcwCEhIHX7xghmhQlzi5ZD7TBEahWUjKZiEpW8DItIpRLDczpzg3PbXA0ESvODEvJbM4Wy85 P3cTIySgC3cwvr7tfYhRgINRiYdXQGRShBBrYllxZe4hRgkOZiURXt9GoBBvSmJlVWpRfnxR aU5q8SFGaQ4WJXHe1tf9EUIC6YklqdmpqQWpRTBZJg5OqQbGUL3DAeaOB/f8va6hVuU6OZE9 smGWbOb0DPsTc5PFWA6vTMo57fYz9cbDQL1TJhenpW60rNkSVFM086Nnjk1H3Wr2NebbXcoa 79ZXrd405W7mNrXKM3HMd+do6314+VEv4OoOLbaJ0YsXzLuz5YLftcitxzLkH4Xelv4udKWj dP/loId5WxQ3KbEUZyQaajEXFScCAIIdFtZkAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAJMWRmVeSWpSXmKPExsXCtZEjRTewZVKEQdsvZouDP9sYLfY8OMdm sXL1USaLC3u6GS1al75lcmD1mPF7EYvH7psNbB7T1pxn8vi8SS6AJYrLJiU1J7MstUjfLoEr 4/O+iUwFq/Urpi8zamCcqN7FyMkhIWAicWPHElYQW0hgI6PEzCsqIDabgJHEt/czWUBsEQED id+9Fxi7GLk4mAVWMEo0HN7PCJIQFoiV2HNhIjuIzSKgKvH31HRmEJtXwEFixvMnTBAL5CV2 tV0EW8AJFF98HGKokIC9xLc/R1kmMHIvYGRYxSiWm5lTnJueWWBoqFecmJeSWZytl5yfu4kR HAackTsYn040P8TIxMEp1cDIdn3aWTnP8EydhIZfaSLXvto3cifvuXjgyCU5/Ydpb+fFxAfp iz6Z7PawOlbghKHefd8T19K05aOPKOw9P33tTvarptZnnzMvPNjLlLHQdENHxKv/18wnl35d 7SHyRX7ZF/EdaTzvghoSMjN3B7Sxrn2V9/mrluhzgTZGrSjewKgDUyVFAnSUWIozEg21mIuK EwG7om73swEAAA== MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39860400002)(39450400003)(39840400002)(39850400002)(39410400002)(2980300002)(438002)(199003)(189002)(2906002)(6666003)(33646002)(4326007)(2950100002)(110136003)(81156014)(6862003)(69596002)(53936002)(81166006)(86362001)(76176999)(50986999)(92566002)(1076002)(626004)(2270400002)(50466002)(47776003)(97736004)(5660300001)(48376002)(189998001)(36756003)(1691005)(54906002)(77096006)(7049001)(50226002)(38730400001)(356003)(5003940100001)(8936002)(68736007)(305945005)(8676002)(106466001)(6200100001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR02MB1421; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD053; 1:pn9Hz73F9eMWgP2T+dKIoemmLesHn45TdP0IpiU8QnDiH18bBrEuTr/FMkRPskxssM5e1giwU0MlktuMnAH7Gilv2kfISUzVbLQ0pquWrJEzLxmZo+XlCwf5dEj4BhmZWY0B8JHyxP89E2JoCPuW5Qf3VNOdNIbSVac49uNSD/8EhgDfd2kYT9DsiRVgnbhjiVP1/7rfYAERZSf4ZTODR9EAO437Aap/PEjez4l/ISDMdixvPJSd2uwzRubqVoDdDbBRBFLkQaXuCdqwW0WRwsiiYaqrdJi9zHDMpVLkbnrP2LpBNvV8rSlRabliB4omKk9TOma/Og9kUvhvbUL7Wxku/MzkzXlOu/ZXgiVqjJX/yDe3vYy1E/IYFpwdQM6f823axLac3bzxttrkVwSjK2RshQe13RFOVeTCUHULXOjJFwZz7JMQOAnQQIBbG9UZEBMnMSuACqFDm1ukvPwebAZ6wTgP+T9Xg3Ao5n70bAkus/BGPBL2bg8bOw0P6BBF X-MS-Office365-Filtering-Correlation-Id: 555ffd5a-eafa-4dc6-5f3b-08d44b06aeb2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:SN1PR02MB1421; X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB1421; 3:npMZhjT3QqfnxBerQ7DCLeQLFLvx0E4bNxRyCHlLaMWWDLMKE1EGC/XtiAjB5nlDjL+DKF95rllcVND779B5+SsGaQk8s9dy6nA+dLNyoC/oc16ye/imCWvBWCvGssWGvO0/Ct0ZIXbwKgk/5300/vWQBO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f5oIsaIFBi06lZg4MYMIPtEYkqsOHWk16NqFx+cWNJ5rqLW9nXEx/jK5uNIMw3lgvqIp3VnHBYAVTFC3frfs9zn5fsJ5n/bi4QUi6ZH5bTWfvEGyHfab7UwQB7XrX1yOC7t5y/z1dkvC97MqIx3A/TJK5R19ZcPvfv0brPJVQA2rkzGvqzgl09KJYKNk8QhwchcgeQbiP+M7sCz3N9QT7m68sELY++wd3y2SLN9dLK10QjUfE6T4hPwsC3ocg7TGgmSIDNxGzTiK9b+x7qHELRieFYCZCvlB4ViICPaIHUWQ4sKB6i5lcenKC2oZ7AUP1a+2q8yHztIarjpkYFq9+8zJlof9npIgIycdBy/E+3+R+hY8wPhGDjZJAJVBq2znc+dBe59kQid35Lqrq0NeVnuTfh7EvLUaOsmfQtYqBl1pamiFWAVBx4Ncwekr5VVaT9Ok/Qzz5y+r4zIum6S2AjdZ7kKoySgZcP/GwE0m/k0 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(13018025)(8121501046)(13016025)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123558025)(20161123560025)(6072148); SRVR:SN1PR02MB1421; BCL:0; PCL:0; RULEID:; SRVR:SN1PR02MB1421; X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB1421; 4:q/CaDcJeE8QRCVzyWQhQLXAG9L0VvEzTuJMB60mJX5WXyzyy2/dL4fn4c98+TPld5wf9c3q/eAdRaOVNonyK7ZUcEmeWv8dDRpyd1pVaOHyaLgjs7C+2iynXxuORHKDuSDSORPGQpNzRQfVju91T8mrMl3A9z8No3a+me+fcKheF2zQDt6M5FZLAWNpGRT4wL8nCsAqqtsOEDcDgiUMc+4CpxWpkqe/soBvrEsUgVBr/MpezJ4HoSCgHx+bqA3tLuHZTwORiLIuzvFRz9BVy5GdxA5QC3SrxlfbrqQ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zcapEGQU1xysqGTvqAMjhoxH8rKR/fA4yf/8mb1F4h2rWRspr70pC9h?= =?us-ascii?Q?fY1D3gTM5gdMrqQF6XJGkTzOyErsGEyOtmRCbQpZodcwYAUNZ/ShtE71lzg+?= =?us-ascii?Q?DJwozfHV4+YcDuYeSRmbSI+mI0WNpuQkdzNtMUSmtXuOvbu7SPUqkHjybsO6?= =?us-ascii?Q?SzOuosjxN4z+telGgsrefwE46vcVsEZYQ7A5bYttV61l+kJowZyL/e+75joi?= =?us-ascii?Q?2CHeGx+joDT5BQXZiS+Zc1+MGvaBUQsoaUGw+nN+zlu0cS0Y4qTOjijSvfpZ?= =?us-ascii?Q?TWXJtRKSrD501gZkY1O3qzLCKqof+a3pyqtzgTURtGBB4uAnBwH9HmjmJeoc?= =?us-ascii?Q?ywsSjZWCIqI66+wk4AzTzzD+1auJnsYgCRZ+bt0Os2hDMsmggBmZAKr5XdVR?= =?us-ascii?Q?7bMBylwEFGvd90VdN0Vsh+QXVn6jBpgD5dBeBQIMFZid0q3nmxIpH9GWUUug?= =?us-ascii?Q?WSDADHrsHrP75ctj70vuXiRYPKwv6kZzLIil53O61A5d9aPxfkctomCnkzR5?= =?us-ascii?Q?V4sZ6z9uhLEQ3GL66fTMeI7S6BUx+cDjdsXMBcJXv798OUhpYvgM4/yGloyE?= =?us-ascii?Q?3bnE38KGo381p1u/4jjrxJflMLuk7lEL6n+clX5/2X1B8d4IvsyxzLAiR1Rg?= =?us-ascii?Q?sL4QYv5VvGyAUirZwwFO2BdMWHbf0k50NpFmYHiuWs5HLwa17Xqoo3JAZRP7?= =?us-ascii?Q?4nHbShDgSWpejO5M8DX9oQ9l7El5/dqRs9jaUTPp2RDmo+ag5lAnkl6Aw=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR02MB1421; 6:paUAEgaS9m7UjISntWoDNzLTJSxlmVuEC6VPywWA+LkUh6+CQUriEmYI8qHoLw+kGCWFGx422xKctrnnivPDlNGLp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E1PLmLltbqHecFC89EN4BiXQZfI+EglMSiATk5iwm3VsGL7pBSieV3CmgUaZayO5CBYu/nlREaVgM4LUgDMjHsAxE1aUJlJ0MRUEuyrRNB2JmxYDqA5nRW5z2FobVuVmT7Pg/Fmx8CgyP0BNzMdBNidGU6kSW0YbV5Y8YUBf8xsq6najcdFOz303CYlhN2tlRnhio0MnIvENMoEGVyUZVvN3n9359uVi X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2017 00:59:03.4526 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR02MB1421 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the new flag TARGET_SCF_IGNORE_TMR_LUN instead of letting the qla2xxx target driver look up the LUN of the command that has to be aborted. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Himanshu Madhani Cc: Giridhar Malavali Reviewed-by: Christoph Hellwig --- drivers/scsi/qla2xxx/qla_target.c | 66 +++++++++++++------------------------- drivers/scsi/qla2xxx/qla_target.h | 2 +- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 8 +++-- 3 files changed, 30 insertions(+), 46 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 45f5077684f0..0a32a3786c4e 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -1818,39 +1818,8 @@ static int __qlt_24xx_handle_abts(struct scsi_qla_host *vha, struct abts_recv_from_24xx *abts, struct fc_port *sess) { struct qla_hw_data *ha = vha->hw; - struct se_session *se_sess = sess->se_sess; struct qla_tgt_mgmt_cmd *mcmd; - struct se_cmd *se_cmd; - u32 lun = 0; int rc; - bool found_lun = false; - unsigned long flags; - - spin_lock_irqsave(&se_sess->sess_cmd_lock, flags); - list_for_each_entry(se_cmd, &se_sess->sess_cmd_list, se_cmd_list) { - struct qla_tgt_cmd *cmd = - container_of(se_cmd, struct qla_tgt_cmd, se_cmd); - if (se_cmd->tag == abts->exchange_addr_to_abort) { - lun = cmd->unpacked_lun; - found_lun = true; - break; - } - } - spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags); - - /* cmd not in LIO lists, look in qla list */ - if (!found_lun) { - if (abort_cmd_for_tag(vha, abts->exchange_addr_to_abort)) { - /* send TASK_ABORT response immediately */ - qlt_24xx_send_abts_resp(vha, abts, FCP_TMF_CMPL, false); - return 0; - } else { - ql_dbg(ql_dbg_tgt_mgt, vha, 0xf081, - "unable to find cmd in driver or LIO for tag 0x%x\n", - abts->exchange_addr_to_abort); - return -ENOENT; - } - } ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00f, "qla_target(%d): task abort (tag=%d)\n", @@ -1870,17 +1839,27 @@ static int __qlt_24xx_handle_abts(struct scsi_qla_host *vha, mcmd->reset_count = vha->hw->chip_reset; mcmd->tmr_func = QLA_TGT_ABTS; - rc = ha->tgt.tgt_ops->handle_tmr(mcmd, lun, mcmd->tmr_func, - abts->exchange_addr_to_abort); - if (rc != 0) { - ql_dbg(ql_dbg_tgt_mgt, vha, 0xf052, - "qla_target(%d): tgt_ops->handle_tmr()" - " failed: %d", vha->vp_idx, rc); - mempool_free(mcmd, qla_tgt_mgmt_cmd_mempool); - return -EFAULT; + rc = ha->tgt.tgt_ops->handle_tmr(mcmd, -1, mcmd->tmr_func, + abts->exchange_addr_to_abort, false); + if (rc == 0) + return 0; + + ql_dbg(ql_dbg_tgt_mgt, vha, 0xf052, + "qla_target(%d): tgt_ops->handle_tmr() failed: %d", + vha->vp_idx, rc); + mempool_free(mcmd, qla_tgt_mgmt_cmd_mempool); + + /* cmd not in LIO lists, look in qla list */ + if (abort_cmd_for_tag(vha, abts->exchange_addr_to_abort)) { + /* send TASK_ABORT response immediately */ + qlt_24xx_send_abts_resp(vha, abts, FCP_TMF_CMPL, false); + return 0; } - return 0; + ql_dbg(ql_dbg_tgt_mgt, vha, 0xf081, + "unable to find cmd in driver or LIO for tag 0x%x\n", + abts->exchange_addr_to_abort); + return -ENOENT; } /* @@ -4195,7 +4174,7 @@ static int qlt_issue_task_mgmt(struct fc_port *sess, u64 lun, break; } - res = ha->tgt.tgt_ops->handle_tmr(mcmd, lun, mcmd->tmr_func, 0); + res = ha->tgt.tgt_ops->handle_tmr(mcmd, lun, mcmd->tmr_func, 0, true); if (res != 0) { ql_dbg(ql_dbg_tgt_tmr, vha, 0x1000b, "qla_target(%d): tgt.tgt_ops->handle_tmr() failed: %d\n", @@ -4272,8 +4251,9 @@ static int __qlt_abort_task(struct scsi_qla_host *vha, mcmd->reset_count = vha->hw->chip_reset; mcmd->tmr_func = QLA_TGT_2G_ABORT_TASK; - rc = ha->tgt.tgt_ops->handle_tmr(mcmd, unpacked_lun, mcmd->tmr_func, - le16_to_cpu(iocb->u.isp2x.seq_id)); + rc = ha->tgt.tgt_ops->handle_tmr(mcmd, unpacked_lun, TMR_ABORT_TASK, + le16_to_cpu(iocb->u.isp2x.seq_id), + true); if (rc != 0) { ql_dbg(ql_dbg_tgt_mgt, vha, 0xf060, "qla_target(%d): tgt_ops->handle_tmr() failed: %d\n", diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h index a7f90dcaae37..bc9468f7a643 100644 --- a/drivers/scsi/qla2xxx/qla_target.h +++ b/drivers/scsi/qla2xxx/qla_target.h @@ -669,7 +669,7 @@ struct qla_tgt_func_tmpl { void (*handle_data)(struct qla_tgt_cmd *); void (*handle_dif_err)(struct qla_tgt_cmd *); int (*handle_tmr)(struct qla_tgt_mgmt_cmd *, uint32_t, uint16_t, - uint32_t); + uint32_t, bool); void (*free_cmd)(struct qla_tgt_cmd *); void (*free_mcmd)(struct qla_tgt_mgmt_cmd *); void (*free_session)(struct fc_port *); diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 8b878a2d7304..4d9180efb9aa 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -580,10 +580,12 @@ static void tcm_qla2xxx_handle_dif_err(struct qla_tgt_cmd *cmd) * Called from qla_target.c:qlt_issue_task_mgmt() */ static int tcm_qla2xxx_handle_tmr(struct qla_tgt_mgmt_cmd *mcmd, uint32_t lun, - uint16_t tmr_func, uint32_t tag) + uint16_t tmr_func, uint32_t tag, + bool use_lun) { struct fc_port *sess = mcmd->sess; struct se_cmd *se_cmd = &mcmd->se_cmd; + unsigned int flags = TARGET_SCF_ACK_KREF; int transl_tmr_func = 0; switch (tmr_func) { @@ -621,8 +623,10 @@ static int tcm_qla2xxx_handle_tmr(struct qla_tgt_mgmt_cmd *mcmd, uint32_t lun, return -ENOSYS; } + if (!use_lun) + flags |= TARGET_SCF_IGNORE_TMR_LUN; return target_submit_tmr(se_cmd, sess->se_sess, NULL, lun, mcmd, - transl_tmr_func, GFP_ATOMIC, tag, TARGET_SCF_ACK_KREF); + transl_tmr_func, GFP_ATOMIC, tag, flags); } static int tcm_qla2xxx_queue_data_in(struct se_cmd *se_cmd)