From patchwork Tue May 23 23:48:41 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: 9744467 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 C5A256037F for ; Tue, 23 May 2017 23:49:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B90C128818 for ; Tue, 23 May 2017 23:49:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADFD228854; Tue, 23 May 2017 23:49:50 +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 1ECA828818 for ; Tue, 23 May 2017 23:49:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031611AbdEWXtt (ORCPT ); Tue, 23 May 2017 19:49:49 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:5730 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968808AbdEWXtb (ORCPT ); Tue, 23 May 2017 19:49:31 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="19876932" Received: from mail-cys01nam02lp0055.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([207.46.163.55]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 07:49:08 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=t2bMH4YLEArxwtUurpOw+8OpfAHSAJD8jm3CJESzYd0=; b=ZDbNdYwlHs/+67+8OueXcQgq6+6t8oI8mnMHwL5Nppu18ZcOY4YqkhNjBzplyEl+FpqsN+2zDbSI+Vt5PgutN6/jgU8r9onhgMbMpWVDZDlWQ8RzVZwWrA9LvAzxoXBkHww+9JJB9a+UEsXXg9n0BElybHh25Wlli8yuD5odKQ4= Received: from BN6PR04CA0044.namprd04.prod.outlook.com (10.174.93.161) by CY4PR04MB0503.namprd04.prod.outlook.com (10.173.190.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Tue, 23 May 2017 23:49:07 +0000 Received: from BN3NAM04FT016.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::200) by BN6PR04CA0044.outlook.office365.com (2603:10b6:405:3b::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14 via Frontend Transport; Tue, 23 May 2017 23:49:06 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; suse.com; dkim=none (message not signed) header.d=none;suse.com; 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 BN3NAM04FT016.mail.protection.outlook.com (10.152.92.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1075.5 via Frontend Transport; Tue, 23 May 2017 23:49:05 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) by (Symantec Messaging Gateway) with SMTP id DA.D1.45291.F6AC4295; Tue, 23 May 2017 16:49:03 -0700 (PDT) Received: from milsmgip12.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; Tue, 23 May 2017 16:48:59 -0700 X-AuditID: 0ac94369-166ac9800001b0eb-04-5924ca6fe1ba Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 10.03.18148.A6AC4295; Tue, 23 May 2017 16:48:58 -0700 (PDT) From: Bart Van Assche To: Nicholas Bellinger CC: , Bart Van Assche , Christoph Hellwig , Hannes Reinecke , David Disseldorp Subject: [PATCH 20/33] target/tcm_loop: Use target_submit_tmr() instead of open-coding this function Date: Tue, 23 May 2017 16:48:41 -0700 Message-ID: <20170523234854.21452-21-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170523234854.21452-1-bart.vanassche@sandisk.com> References: <20170523234854.21452-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRmVeSWpSXmKPExsXCddJ5kW7+KZVIg2UrLCy+/p/OYrHgzV42 i5WrjzJZtK0+w2jRuvQtkwOrx/3tR5g8dt9sYPNYv+Uqi8fm09UenzfJBbBGcdmkpOZklqUW 6dslcGUc37+PpWCJcEXznHvsDYwf+bsYOTkkBEwkzvyazN7FyMUhJHCAUeLP3i5GCGcbo8Sq N6sZYaqev53KBpHYyCjR9LuDGSTBJmAk8e39TBYQW0RAR2LW3Rdgo5gFtjNKvP3cBZYQFkiR OPOiG8xmEVCV2DP9NZDNwcEr4CCx46UfxAJ5ibNbdoLN5AQKr9yzjRmkREjAXuLyd2WQkRIC k1glbs77xw5SwysgKHFy5hOwkcwCEhIHX7wA6xUSUJc4uWQ+0wRGoVlIymYhKVvAyLSKUSw3 M6c4Nz21wNBUrzgxLyWzOFsvOT93EyMk2DN3MN594n2IUYCDUYmHN8FBJVKINbGsuDL3EKME B7OSCO/yDUAh3pTEyqrUovz4otKc1OJDjNIcLErivOdkpkYICaQnlqRmp6YWpBbBZJk4OKUa GC2abwVeFHoVzFMd9HXeUYvNpVVpB+Vv7HvmuD4112BFBjO7ZYTozII8vrnlr4J3uezZ1nTv tu6e2qrDqq3u72aU2hv28hkdeikxpdVsjtEmxdgHa3+vNNTwkz/zNTfqzDU744V5YTf2xskz L//VE6RxjfeiYUW4Q+Njj8sGTjHnTfaZs3yapcRSnJFoqMVcVJwIAJc4OAhyAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHJMWRmVeSWpSXmKPExsXCtZGTTTfrlEqkwd9n+hYHf7YxWnz9P53F YsGbvWwWK1cfZbJoW32G0aJ16VsmBzaP+9uPMHnsvtnA5jFtzXkmj/VbrrJ4bD5d7fF5k1wA WxSXTUpqTmZZapG+XQJXxvH9+1gKlghXNM+5x97A+JG/i5GTQ0LAROL526lsILaQwHpGiccv i0BsNgEjiW/vZ7KA2CICOhKz7r5g72Lk4mAW2Mkosf7vGVaQhLBAisSZF91gRSwCqhJ7pr8G s3kFHCTmHP3GCLFAXuLslp3MIDYnUHzlnm1ANgfQMnuJy9+VJzByL2BkWMUolpuZU5ybnllg aKRXnJiXklmcrZecn7uJERIiUTsYr080P8TIxMEp1cDIb5L/5eU566i1z7911Oy7tHrtl7eN NUelNPnO7mN4JVZcliTjLMJi23H04vZFB9xub71We7VucdSTFQntIVkJocZTs/5zTbvXxfjp wTH7Txv5VLI3+iS9aF101dReNyEuXOzJZ+7pdcKdf6+l3ni/2CKQMy3VM8Ddhv8hf8mThdIH 1toeOfNFiaU4I9FQi7moOBEApCAIs8EBAAA= 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:(10019020)(6009001)(39850400002)(39860400002)(39410400002)(39840400002)(39400400002)(39450400003)(2980300002)(438002)(189002)(199003)(9170700003)(106466001)(86362001)(356003)(77096006)(81166006)(47776003)(8936002)(53936002)(8676002)(50986999)(36756003)(110136004)(5003940100001)(76176999)(189998001)(38730400002)(478600001)(4326008)(1076002)(54906002)(50226002)(50466002)(48376002)(6916009)(305945005)(33646002)(6666003)(72206003)(5660300001)(2906002)(2950100002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR04MB0503; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT016; 1:NVfXFwxAATFhcHPYvZ2QvtlYfd69lBHMxTW+2spTjhnjYllYft5At/iUUIT1W4vZqJhbV8SlzXgcPYxiDFyY0Y60+erbBSGARnqnj4xPV/bp5DENwdeHrwa0cVD+J9Vez4dmJs0SqDlU+JkNxQKQzg6PVjLW5VNrM+3/g7aBTngHrXLDN4282zwsku66amWmvhEHEkOIrOmh4MielqHImd6yB001utEOzo9qb1UThQ+kBYY+MmHh79R85ATk+tW7gwkeLI9QyQA/Rgqr2qm/Nj7NVOMMtJgopPY9a7unQ3NMJ0OqQ6w0zDFAzQmmb0aiNet6bBuxfsyXOzOgBkhdbDFoSh+DMbGtvdLN8e/AMxwwTG1GZGevSuWorLZE6S/m557Vq3cOSiFg6vDtpKpkK9zqeL3uYlb/+EIOhFmsKdY6pqFKhZdfEdGb9MHykQT9Wh1trET1t6EAqKkPEnTDKEEPsrsTmlRVA73b+kDdahYbg9EVFpG1NRfXM+1cyIwssv7eFKaFJrt1W2UpB3EzDZPBjpQelc/ZUM6iUH2Xpys= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR04MB0503: X-MS-Office365-Filtering-Correlation-Id: 67f273c2-cd7e-4e89-ade6-08d4a2364c3f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:CY4PR04MB0503; X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0503; 3:IyCNQ71QUWBxyMSUaZqIgaBK+K+8JvGVEXAiv3Dw/7gsb1zu9BdqiX1KjlkoHjGw2UWj5jkQXR6fLBWeKW8FIt1HysTGfp6zblo9xArjnVoh0DYG4v15G1KDxxFeJy+joUsNoc8oOlfGwR8s2H+wTtI8o3vbzLAD19S7DrI1HdeERrK7qOZuEFFrb7jydIXpx+4woQbU17kPoHRiPywPROAhecte5NohblzzzytCwvy6Ynv8ELayTALb0tM0OLSkb/gi28e8igscv5aew/M99A/aXeKN+GD1NvDy1kfYkbXzlrBt68Eyh4/wxozWHme5YCeobcqdBSMxHlPi6Rqi5l55jqwUnEVn50ETnFbm3qeUKhjQm3RzA9h22YNC+2HaUMtUE4M+gdcAipqvPgXfk2QIrB/sLDN/Go+Q1qDeGCfqvcg0oVPcwzi1cXmIilfyVfUYXH1Q0MmQXWXQoP6L2VwBJpTWttenQ2DgbryOv09ZIyG8dAbp1lHLm0ePAMIb X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0503; 25:DYswDhgioOIkmi1pPm2SMwZg9scFsJjBrpK34j4DVt5btH3xiY6GbzuSw4doaiqCmJ3Ex2+9hZOVek9Mk5J4DhavlqRtT5HFDVe2/J+P4Wc+GhxIZV+cEGzLv0B9NPdcRrQI2xHqCtrk1QPYG7ZEg6EIdudacZVbB4sFDCR3xgVyTXPZC6TNpPftIRkJBKnzg4DefLblLUrqh46PFT1tOXfYEYKrwXxkG3lQ5P2d71Z2lD9mA54Ak/08JP2LcLG8B9o8YSwHSeMn/u8QV+6WvYE2AqJaw3oCRD+e9NejfQV9chT+CjRfDnJg8QZ5rdI0e0kMLXmH0N7l/RG+/XDyiGhsjHUaVxLIgBpvZHH/JHzXKY7Nb5qcV4PtZ+mma1EWlPSsnc+E/OK548A7/jqf9jr0gYIlZSLG7xv6NYsEiY6T+6Br2wnu6NdARbvd4++ScK/x7o1/GbV06RaGsm+zvkTOqEMLj32Do6/p6AVVx4g=; 31:6o9pI1vbCc+1cJb07trrtpbAvwjEsqB0L+fQzMpTij+Jrle7QPPs4WewhMykC17/JKNv8ibpc0TxWrLtZNU9MkoEOdgHxrgqZjoKX1debwiXLW25biyo+QqxYk5QjtJzqu8aHjK4XmMTDZVk9jjJMCAVEYZKqhZzMu7p9nxMY0WZGpXQgYccQiFQQVdJdw5hoGQwCSQ3Z+fMY3t6XNyH8oqVYYiVIcKNCpTDcdYDajfWuiy9sYttdk9YvY0Ao9YJ+DmG2jv/Mho99J7C8iTywA== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0503; 20:cs8N6RJz7+jSTaB+u2HOS38XlOAEWUtfDdC4mxwfJeiQLQimQ3eBboZAz6ce7PvC3FdxI6nCyc04X1HGi5jLE4qkBeC8cOgXB4t4d/+gkp+6IxJHb79C2T2VQ5FrMcN+eYe9rLpSFEAVczontBfC5tgTrE3L99uEipWhLFKCa99QWbGGZ11OmLlA4sIfoXxUwxa/+QSVOpwlTgwZLLiw/MvYDpT35Emt6gs28DjD2VFijXX7jNSm1wDe7efbaKVdml0lmFdoOB6jYWgUoIKPtEXuwv66eljK0oFbwfdvyziwqQzQV/SfFdskr/YHs2DVrmKYTCeEI/xUPyVJ0WdK/AE/g+XA0qLOd9nRcRLycqUDWF07xErjjmiimiJQ6JE/H1EOTb07jS2e+ZuQeeVhs/y4cFYVQ7mRB5pLawgCrmG82kMe3pctqwXjxu/Ka/QJYZXd11VMaN597kF5cjvv4sga3kEezL5LpAm4OITdwp8fiRpJM10WwetX4afMy1GZ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700051)(100105000095)(100000701051)(100105300095)(100000702051)(100105100095)(6040450)(601004)(2401047)(13018025)(8121501046)(13016025)(5005006)(93006095)(93004095)(3002001)(10201501046)(100000703051)(100105400095)(6055026)(6041248)(20161123562025)(20161123558100)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(100000704051)(100105200095)(100000705051)(100105500095); SRVR:CY4PR04MB0503; BCL:0; PCL:0; RULEID:(100000800051)(100110000095)(100000801051)(100110300095)(100000802051)(100110100095)(100000803051)(100110400095)(100000804051)(100110200095); SRVR:CY4PR04MB0503; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR04MB0503; 4:qf7MwdWGib3wKnUrZYsTcl36UeV3YaZ45GWVqbbTON?= =?us-ascii?Q?Vh32GvwZFuBh/eBUY1PYToG33h92c6c1AgMWtCXBpz0MTCjU6dD+zpV72wCa?= =?us-ascii?Q?9KTS8QSba1uiEFPFIpSW4aHqhkDB/1ly/CtlbVoGU2tyxcHPJIpG2+vQ6n0o?= =?us-ascii?Q?HLla7iTCY8FagOIy/68IrG9g1P+0oHgfzjRwxi4OmQb5NoO5HXtUJQhitt9q?= =?us-ascii?Q?YtyW73t5CTP20r9wWurhh3K0/8CWaIHVVUbcb01deAZ4+5kQnXZKtdnE8YHc?= =?us-ascii?Q?bIL5Jn0KqiJKrgp3Zp1AoXDfh8GKzJiTqcJymQB0mE4Uwo7NoUhDxQ1JVV1Q?= =?us-ascii?Q?rVXAox1LpAYbqXBdOQVK5My8Y7Xa+eKkd3N3jaYSnrn6oBn8jLIzw9WLH4qk?= =?us-ascii?Q?7tMEolbF7IfCxaga17vl4evqBDMBkhipGpRR9McVG63oO22HUO1qU+eRM5c+?= =?us-ascii?Q?c/gczpfAS8idopEkP6LyE92+t8D8qHZ7s2cWYVs6s6suLxR1iuH6u+jCJC87?= =?us-ascii?Q?BWlCVPjvY2SSvcYX+5qxrM8Rh390KEQOUhPXazTxFnhlrK07dLpMySGAr5eA?= =?us-ascii?Q?x8pwTISkgMzhR6MgAbGrkSY5LmPRb0J/iyKTyv/2AXXVIjZV3LdkzE8cD8+v?= =?us-ascii?Q?086nrfz+xfz71ESdXQP5bU2VYklAAJc5umz6sjm2ncJONao9Vo5kSHgToKud?= =?us-ascii?Q?JYaCnbahsgmKIdulpHpclikLaZFomcyFnWamMKNP23nfyDzuga7iWU1SOTeD?= =?us-ascii?Q?MPkoiMv3ZOee+OVYJlztI2ZyEBn4PuEoAkYMWk2feAUjUCpsy0OXp+6ON51d?= =?us-ascii?Q?caJ/7qP3wvsBO3a0snxCIdCNgFgqlbV7kBacVhEE0uJXKwKbwsAOssdqj4z8?= =?us-ascii?Q?bInGPScBjkzhr68ekLJkiQ31B1HSW6hrY40OIQut0BkXyVmPiNzSKwTLHtQ2?= =?us-ascii?Q?+CovG6e3yvwE44+PPGgEz60EPGgRXzEbUvoRERFubifA/+b/zvCGzrA6Z9zz?= =?us-ascii?Q?2Bopflbq9gkTm5Bf5QjClVG0WWrCQRqUweXkVSbMFaVvgxk4QxQT+cod33kB?= =?us-ascii?Q?PR/ycgk0kDx9+Nw7jLwUziF8BhaCheDmFYwJH5Ydd111GbBZNbH5K6IwsmjN?= =?us-ascii?Q?oqrwQkm/i6r2TqAf0t3DdJ+ib6c7N4tWxH7city+ZOl4ilty0plvuixVsxh2?= =?us-ascii?Q?KHrpsLsDxJr9Lcd9i53bNoumpngwhTFFO3RsicAMF8bvuw5Cxbb0BG2DmTsf?= =?us-ascii?Q?nspksVj1keZ01iWHY=3D?= X-Forefront-PRVS: 0316567485 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR04MB0503; 23:Z5dF3TF71mTZmYk8zJ8vWrwi1yynwKr9haIn/XA0D?= =?us-ascii?Q?dWW6F420nMuBjqfnaIeioKgquuRlzP9Q7Gsnk9Qg5WZ1iZyYXkhBLshH3ACP?= =?us-ascii?Q?Ge5TUtoKkw4y3xGpft5bsvN4d1+hXPNhyEj0gp+YoprzISTYrk2TfKScjfCx?= =?us-ascii?Q?w4YwZ6sI7jC9ebZVE1figUbLl6FXmvFWwPjDZjmF/WclpifAS8D5k8aF7gts?= =?us-ascii?Q?cCqPlxmBd2Xdvak8Y4W0VFuktzSSsESdcbupBGieEzDgG+uyogJEXjkk/BHw?= =?us-ascii?Q?bFL7RQTIww/bZfqUFlULsRm8xMibqE4sXflPpySaJRsq7LE/gGnjpxyBijGU?= =?us-ascii?Q?dlZGLTOrWxScYLwQHgLZJ+tJ9lhdwKh33bBsnhdy8vGwwia/cHGGhr0tJ/8j?= =?us-ascii?Q?EpqCTB/Ls8syxnMJg+tii2rtoI1Q+k1EBXEtSo+afQDkHmg+nEDqhsdhz8h5?= =?us-ascii?Q?S3rbrAChemFrsyj6fg+ME00yYPhNQgskRUaZJWBPikix/7j9igmBKwOJmZfK?= =?us-ascii?Q?iP9/4w+g3R7wM7XhrOfC2PPB2hvCvLuUnOC1fnmx8vxbtw37trkQTdOeCTBa?= =?us-ascii?Q?Dd4n83EhS8PQTnJVKT6onZYrFCDWagwANx+StCVoLh12MKXSPmSXFtmJcXCO?= =?us-ascii?Q?Yvoekw7h/8vc3/+sf/8sr97jDXFVZXq07D9DZBttYeu+eg43wC2niFdGPFqB?= =?us-ascii?Q?LYStXZ5hFZZqcW4AanBPnbLRs3V6bMH7Vt1f3+CiUOum+AN6jDVeBjlUUH/v?= =?us-ascii?Q?zP8zMin+y+9nmX5acpgXvCxTU8TauTeA6zyIPblJrbgOFq5PxiZo/4Djym6o?= =?us-ascii?Q?mjxokc7jXimbtKYbDUBLIJIVrshrTO6COMRgygcnbE5UxHJ7U6kCq6wZLfHF?= =?us-ascii?Q?C6syVQFLHecBTS9rE8p+2s15vk9BJ3IByAeK+RG8OxXiW0WB3lF14XBbVqcc?= =?us-ascii?Q?9e2+FfnNSbNCRGsewdOOh6q8d35acBrHbYNyWaCcdDDZ0RmszVh9E761BQYn?= =?us-ascii?Q?EtRCOEiceaUMGlDn/Y1iOUOGrOee6PL5FTfbNDfChuxC4REN0CKnHphQKmpV?= =?us-ascii?Q?dIyaUeZceQqMVGRGzih7Wogz8Az1tfzZrknonuOh8yB/hw8tQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0503; 6:4zD59c0aorYTxH4quomO5hjxRhrGMYAn6G1+veAQwuTGO8Sy8ZV5cPdMqMpxXbHtulDNwF9OzEk1LZF46Jw9nGrlrijHBJZVf9Sj5rDnzpJPFpxeqQgvPSoVraYQ9j0ntMXd/ZA/H43aUQQwrJA1oKMlRINRku55mCEt+gVihxrJsK5+cN9Gm7PfDpI9pJCTnKtT6YYQkH6vSjTESV9BSPDIUYEcpf3j938j4rgeyQJjd4IVNysdULWfkCj7fy6oM0dMHGqhPbnaBHefpWAONaSKkqPtmiCtNkWcDEP7pEo7xLTSS0q2Dycx94pHJswf23T+h1y04MusLqA8oanZgrCbsxBnNl9pu/iZvhEnzYHahASd84/35yTp1B+oj/CjkQBrSdfUb9OD8D5xuYzQziPVCy8HAFMF7sl8imEb414pYpc0ME9XQiZf/Lt2QK/Ed+l3vpTC4faDkIa+wMbCxdFKl1g3MweqlOFX4KJLexcd6ITRvmYfxHs4MDEMqXjol9mbaxzTP/Q+bnuNGJBnvdDQ2Fyn0dzuyQiAPPUiU88= X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0503; 5:1HkGxUepYy2Y0OSlzWI8ovLZ9Exrgv1gZEj2hircaHLm2e42XMpaSr4+gJk9IqSwcgZdpXXJhbNI2PLRCanym3MDbxjBth+pjUHOuutbJBX3IBvZzor7VLQjbzKswqxLrrsF78jH6jl3jRTn0OnScWW4rA1PnGZFSZVutkLkkU1pcIVA45szcuhcunFkGpT19d86VMBQEnVZLgnDQpMJiaxWl3Fhls5SBus+AeVOKxxZjdxmQ4cVKMBIBLCwCaRRg8VbtdAQ1acpmt95BEQ3DPjHq8xm953IOeygqemuW1DLjPqoT8PrEgFvausBPQMX8zoWNbln16dB3LlTgkpd0mjJvjedenqCAhEJQGpnxAbcsdFpaKRugC5LvV85FqViHQc+GW02eZeqA5+xaJv51ByMSGsOjy+fnZ06brqJ1vubTMAGO20llamq4sScsSb/6yS/8IPhtbB01xXSbCBKbw==; 24:EBBjijdqGJrFHrjurUMY9ujRUcP1/4TkSKkff8XG8JnYukqsZIoghDySxFgWrM8zK07V0wbHoYqYUiB1SGeHh+yhY0pogCCaF5wQ2u53IJQ=; 7:fpHPwtA1Vu9hk4Bxpri2Ocl6NqB6nnk+jzXHrr8+URdyIWgrhDTgDLDXl3JdVWOlVcUUyyixlTOT/0I9IbBG9Tr7wUcCkoI0pby37v2Wn5+kU3MJisQb4zeJt7sLhrAdxIPkUSEqEiihz18LmubvXG5DloTKxgtcIoVi0kPjkTW5KW/82KN+BFXyL996wH2snPDW7yLLN3+O3iGSIHQKXxOWqcUgBfwWgBhb/oSEQUFK5rl4hDdKXYHDpb8iDSa5zLibyFXpHaRx5TxNIEexUZ9ERf2Roxv1EOymreqtWzArDgQo44aCRrIHSz6Jg2vyy0N0wcb7cS67s0cdOAgqzQ== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0503; 20:fm7x6/8CuD5dSKne1cKUz1JbqipF5yv4BlJvdVy05ttvqnVoy6nzxOvMl+NdApr1wcEr9hrHrq1RWoEVT2mjZZNaF+Ope8AlUMMANVcemqYPBgv+cTxUplPLZXRVHKHhhp4pDY0UacD81fLUNHKSbcg79vKD3RS1sd+up/ny7Mg= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2017 23:49:05.2101 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR04MB0503 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 target_submit_tmr() instead of open-coding this function. The only functional change is that TMFs are now added to sess_cmd_list, something the current code does not do. This behavior change is a bug fix because it makes LUN RESETs wait for other TMFs that are in progress for the same LUN. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: David Disseldorp --- drivers/target/loopback/tcm_loop.c | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 27f912747113..8cf556b4c5ca 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c @@ -218,7 +218,6 @@ static int tcm_loop_issue_tmr(struct tcm_loop_tpg *tl_tpg, { struct se_cmd *se_cmd = NULL; struct se_session *se_sess; - struct se_portal_group *se_tpg; struct tcm_loop_nexus *tl_nexus; struct tcm_loop_cmd *tl_cmd = NULL; int ret = TMR_FUNCTION_FAILED, rc; @@ -242,40 +241,15 @@ static int tcm_loop_issue_tmr(struct tcm_loop_tpg *tl_tpg, init_completion(&tl_cmd->tmr_done); se_cmd = &tl_cmd->tl_se_cmd; - se_tpg = &tl_tpg->tl_se_tpg; se_sess = tl_tpg->tl_nexus->se_sess; - /* - * Initialize struct se_cmd descriptor from target_core_mod infrastructure - */ - transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess, 0, - DMA_NONE, TCM_SIMPLE_TAG, - &tl_cmd->tl_sense_buf[0]); - rc = core_tmr_alloc_req(se_cmd, NULL, tmr, GFP_KERNEL); + rc = target_submit_tmr(se_cmd, se_sess, tl_cmd->tl_sense_buf, lun, + NULL, tmr, GFP_KERNEL, task, 0 /*flags*/); if (rc < 0) goto release; - - if (tmr == TMR_ABORT_TASK) - se_cmd->se_tmr_req->ref_task_tag = task; - - /* - * Locate the underlying TCM struct se_lun - */ - if (transport_lookup_tmr_lun(se_cmd, lun) < 0) { - ret = TMR_LUN_DOES_NOT_EXIST; - goto release; - } - /* - * Queue the TMR to TCM Core and sleep waiting for - * tcm_loop_queue_tm_rsp() to wake us up. - */ - transport_generic_handle_tmr(se_cmd); wait_for_completion(&tl_cmd->tmr_done); - /* - * The TMR LUN_RESET has completed, check the response status and - * then release allocations. - */ ret = se_cmd->se_tmr_req->response; + release: if (se_cmd) transport_generic_free_cmd(se_cmd, 1);