From patchwork Wed Jan 25 23:36:22 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: 9538103 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 66F976042C for ; Wed, 25 Jan 2017 23:37:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A4E427FBB for ; Wed, 25 Jan 2017 23:37:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D31D27F99; Wed, 25 Jan 2017 23:37:03 +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 0C3BC27F99 for ; Wed, 25 Jan 2017 23:37:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751930AbdAYXhB (ORCPT ); Wed, 25 Jan 2017 18:37:01 -0500 Received: from mail-by2nam01on0057.outbound.protection.outlook.com ([104.47.34.57]:42284 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750711AbdAYXg5 (ORCPT ); Wed, 25 Jan 2017 18:36:57 -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=L7UNA/wz381eb8vsQUVr6hWFntZNHofjc9GzE6KG33A=; b=mAitZZBcH5oulp+lHNIYe0NACOHryRlCBcNmz34XUugY+6CKec8dDc9n1sKWZ2tWIsCcTo2ow7m/RrqSz7NDWlI1o9zG1o3to65l1ULvk6+qSiXmrYrfF3ekcn64y8pG928ff42BM8q/4ehqR1Jdb+XM0+lIZd8duTzM1aLxyOs= Received: from BY2PR02CA0007.namprd02.prod.outlook.com (10.163.44.145) by BY2PR02MB1281.namprd02.prod.outlook.com (10.162.79.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Wed, 25 Jan 2017 23:36:54 +0000 Received: from BY2FFO11FD001.protection.gbl (2a01:111:f400:7c0c::155) by BY2PR02CA0007.outlook.office365.com (2a01:111:e400:5261::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12 via Frontend Transport; Wed, 25 Jan 2017 23:36:54 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) 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.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BY2FFO11FD001.mail.protection.outlook.com (10.1.14.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.8 via Frontend Transport; Wed, 25 Jan 2017 23:36:53 +0000 Received: from MILHUBIP03.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 78.C8.65426.5C339885; Wed, 25 Jan 2017 15:24:53 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Wed, 25 Jan 2017 15:36:49 -0800 X-AuditID: 0ac94369-b62949800001ff92-27-588933c5007d Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 99.35.16817.19639885; Wed, 25 Jan 2017 15:36:49 -0800 (PST) From: Bart Van Assche To: Bart Van Assche CC: , Christoph Hellwig , "Himanshu Madhani" , Giridhar Malavali Subject: [PATCH 10/34] tcm_qla2xxx: Let the target core look up the LUN of the aborted cmd Date: Wed, 25 Jan 2017 15:36:22 -0800 Message-ID: <20170125233646.2243-11-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170125233646.2243-1-bart.vanassche@sandisk.com> References: <20170125233646.2243-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrILMWRmVeSWpSXmKPExsXCddJ5ke5R484Ig/YFuhZ7Hpxjs1i5+iiT xYU93YwWrUvfMjmweMz4vYjFY/fNBjaPz5vkApijuGxSUnMyy1KL9O0SuDLWbf7JWPBXr+LH idvMDYwv1LoYOTkkBEwk/i1cyNjFyMUhJLCUSeLQ7U5mkISQwA5GiRl/jWCKOg72QxVtZJTo OLGXFSTBJmAk8e39TBYQW0TAQOJ37wWwImaBFYwS/9sfgU0SFoiSmPZjKROIzSKgKvFw6gmg Bg4OXgF7iS/tvhAL5CV2tV0Em8kJFG49+5MF4gg7ifUHWplAZkoI/GORmPD5D9hMXgFBiZMz n4AVMQtISBx88QLqanWJk0vmM01gFJqFpGwWkrIFjEyrGMVyM3OKc9NTCwxN9YoT81Iyi7P1 kvNzNzFCAjpzB+PdJ96HGAU4GJV4eAW2dEQIsSaWFVfmHmKU4GBWEuFdJ9cZIcSbklhZlVqU H19UmpNafIhRmoNFSZzX7d6XMCGB9MSS1OzU1ILUIpgsEwenVAOjhNfKy5f+Baw1qffRe+nu +X9t1JXjmVt7X/0JSAz0Vyq9PllSPnwyT/ms5UvWCt8t9jn76qlRhfq5W+lPFIOEBd7Hzu4J 7T4b/q51wuSpD9SU3+65n1Fk3GCtxs1WstfZP1j++O/fCZMVNvzkeGBTJuye7tV8OkDzUIhB j56ZpMktpiXzTv9UYinOSDTUYi4qTgQADFHI/mQCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEJMWRmVeSWpSXmKPExsXCtZGTTXeiWWeEwZE+bYuDP9sYLfY8OMdm sXL1USaLC3u6GS1al75lcmD1mPF7EYvH7psNbB7T1pxn8vi8SS6AJYrLJiU1J7MstUjfLoEr Y93mn4wFf/Uqfpy4zdzA+EKti5GTQ0LARKLjYD9jFyMXh5DAekaJj7dnsIEk2ASMJL69n8kC YosIGEj87r0AVsQssIJRouHwfkaQhLBAlMS0H0uZQGwWAVWJh1NPgDXwCthL3J/7ihFig7zE rraLrCA2J1C89exPsBohATuJ9QdamSYwci9gZFjFKJabmVOcm55ZYGioV5yYl5JZnK2XnJ+7 iRESCpE7GJ9OND/EyMTBKdXAOP3YDOY5G3/KXu1rP2Snv+Zra8XTeuPs+iu5hyquZmyY78MT b9GR8Dn6bhfnZE+94Ivnz2yO+OLFc2ava58Lz6HKKRo3mlVcGoszpghYlycJrdhRGDvXr1nf V/H6Nm+90/uWvm++IWMt3H6HiXXCqcWJa5lyj01Wct395W+BbUNc7rvegIRNSizFGYmGWsxF xYkA4VscSLUBAAA= MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39410400002)(39450400003)(39850400002)(39860400002)(39840400002)(2980300002)(438002)(189002)(199003)(2950100002)(5003940100001)(7049001)(305945005)(69596002)(33646002)(92566002)(68736007)(6666003)(2270400002)(1076002)(53936002)(106466001)(50986999)(76176999)(50466002)(8676002)(50226002)(4326007)(54906002)(36756003)(38730400001)(81166006)(189998001)(81156014)(5660300001)(77096006)(356003)(97736004)(47776003)(2906002)(6862003)(6200100001)(86362001)(1691005)(110136003)(8936002)(626004)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB1281; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD001; 1:wLwuDN0iY6fJDN5wYDP1FWAZeV6gI6M+6yOXvky9WAsByRoHZoHnqoLjsW7YnlZlIfOM7AbgdEQZPJuWZbunyAe7+aT4nqSoBuw6fZyZeZF8kAIpA0CKdYFLzBjwkqk2jOwb33TGEQpz1d1Io1CdiJo+c+G8H3g8GQTq3q+NZt6qVBOXAPLLpdmgBYqcbWWDTk/os7kw+Ac00bLTiF++TVzM9jf8Ia1km5gRDjDSN6pmvgf9bD/mbTZKZR1xmcGsz0/oglYt29m5a21C1YMMtXoWG8yJBdWVbvXyXjvCWtyPO/K6h8lP36ba+2O4wrHJwqaQD+YIIBnMTkDOyovOA+sr5ISUgTy3mQMhsCL6Y35fe+pJZfplHi5qSHa60swUTO+CQkajlumYC5UGgCcSKgUjMQxci1WPe3VwIEI38baDKVwlmJ9nj0RKmVHpqdSz445LHPixSIrAsvZcYE9NjUvPEjyIZ8PRyRJFQTYV1u61tzdpfQPwOU0VCdZnG7Fp X-MS-Office365-Filtering-Correlation-Id: 565d142e-bbc7-4655-757c-08d4457b0b3c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BY2PR02MB1281; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1281; 3:LnQEg61+j6jWgLz3KIq1dkoIzQ05afNWSIC7ptrWwVduc1PazwIBdlCqsZ5n9+/9t4aqsbMXhOH5SjOxwsDHMOWkiz9ZP62s2ZPsGENEBn1nm0PpiKz9Ntlpeoh8ago0CRkb7J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KTg+Pz56lWb047jMKDxnEAnH+ZHVwTPqnWIpJk7Y0diON582LDlrDYULQglmUivjAEQ3xz0h1hDZhjSzmyGV92YLjUAJjrcl8gwR3mOZ22DU7HBGwBmmyDi0CNMuGO137fNv93WLV3H6NX8BjedJi7kboDCgX5NuJd9DIWbOCpVQSMEozMKpmW/8qG8en6YrYMlzWdBPNMvqxWTmpr2RDzwkAFa5Scoj8kEfuZ31WBazAD3nXDtKgSw9ruQUSHIT84Y4nY9btjujr0WaHOoyBqg5SS6RjMzEPXcxNW3U/o6iqZe4KvFmLJToeJ3uHLTN831UoBR0+sMVlzau7GPNj4L7FTwROD0/uNajPJJGKnXQ6EGOtceCDpSfjzY2KRQumIys/rdek690Igx50DCw8doLxhfJGGw8uUlCwpDPt6A1MgfMLbWHRYiZoYea441wTVYG0361qUx62wiOPe/RQ0PdHOlm9VZljZaHUg/mZtRhzP7Jkd 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)(13016025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(6072148); SRVR:BY2PR02MB1281; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB1281; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1281; 4:cn8CFsMwKA9f3ErARb+1ib3XL2AVO8vmuOOa4FncYvT16wq7Cli/lr3wUhK2jKqZ8h3xTf880h6zU+MllMK4NUryIgdjGRukVuwnBCbpvNfPPAaqjv/A0cvAEf3BqPWCdC8G9/3MXeDkFy8PwhXVorINmlEps2A9CRy87PbcyBi//k3z6zYBsKLAd8QX5eUTnPURV8Oi7Zz4df/XElm/J+cApGodPfsN8FDQ6EYvTWZULV2AuFOGDfJqtsmdWnIkhoBpea2uV3X12dMl060jMgAp4yKirz0Sm0lTj/qK3VYAhljZiDtEHqNzySOVGw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MTapc99V7r81pNp3s/5JFsKK/CEc00r087cJCjm3J8t8PkGqa0+VQiDaWCf6MhA== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2017 23:36:53.7576 (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.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB1281 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 Cc: Christoph Hellwig Cc: Himanshu Madhani Cc: Giridhar Malavali Reviewed-by: Hannes Reinecke --- 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)