From patchwork Tue May 23 23:48:52 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: 9744487 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 943EE6037F for ; Tue, 23 May 2017 23:50:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8708F28818 for ; Tue, 23 May 2017 23:50:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BB5D28854; Tue, 23 May 2017 23:50:07 +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 D2FA528818 for ; Tue, 23 May 2017 23:50:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752570AbdEWXuG (ORCPT ); Tue, 23 May 2017 19:50:06 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:17952 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031536AbdEWXtr (ORCPT ); Tue, 23 May 2017 19:49:47 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="21079242" Received: from mail-sn1nam01lp0116.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) ([207.46.163.116]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 07:49:11 +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=9Se36LjDp/VfwRqFwybaQICzbGNS1OVhpGXoJLKYuTw=; b=e3jO+rU092caLXl/Zgl1nj5xaRwjg6qSoXekkguZWxx4Jdt5Flz1ALbrWYB0q+eJlZQbDocjHiyFRUlhPZbyVcAckOJ3sRvHcnzB+DyYxSBb7rYn7hbO3Lvqv0DgUFRayaMS32SN3F43i7F+sDGZeZ7cjmvtHEekEB4UXqVD48A= Received: from BN3PR0401CA0014.namprd04.prod.outlook.com (10.162.159.152) by MWHPR04MB0511.namprd04.prod.outlook.com (10.173.49.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:08 +0000 Received: from BN3NAM04FT010.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::208) by BN3PR0401CA0014.outlook.office365.com (2a01:111:e400:51d1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Tue, 23 May 2017 23:49:07 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.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 BN3NAM04FT010.mail.protection.outlook.com (10.152.92.117) 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:06 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) by (Symantec Messaging Gateway) with SMTP id 0C.D1.45291.07AC4295; Tue, 23 May 2017 16:49:04 -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-0a-5924ca703db2 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id D4.03.18148.B6AC4295; Tue, 23 May 2017 16:48:59 -0700 (PDT) From: Bart Van Assche To: Nicholas Bellinger CC: , Bart Van Assche , Himanshu Madhani , Quinn Tran , Hannes Reinecke , Christoph Hellwig , Andy Grover , "David Disseldorp" Subject: [PATCH 31/33] tcm_qla2xxx: Move the code for freeing a TMF into tcm_qla2xxx.c Date: Tue, 23 May 2017 16:48:52 -0700 Message-ID: <20170523234854.21452-32-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+NgFvrBLMWRmVeSWpSXmKPExsXCddJ5kW7BKZVIg9ePVS32z3rGZPH1/3QW iwVv9rJZrFx9lMniwp5uRou21WcYLX62v2a0aF36lsmBw2PG70UsHve3H2Hy2H2zgc3j/b6r bB7rt1xl8dh8utrj8ya5APYoLpuU1JzMstQifbsErozPHS+YCs6oVNzsP8zcwLhevouRk0NC wESi7+RGxi5GLg4hgQOMEmuev2GFcLYxSqx6s5oRpmrr2XlsEImNjBI9t1tZQRJsAkYS397P ZAGxRQR0JGbdfcEOUsQssJFJ4svCVewgCWGBMIkHDc1gRSwCqhLPnl0Aa+YVcJDYufw5C8QG eYmzW3Yyg9icQPGVe7YB2RxA2+wlLn9XhijZxiqxYFEJRKugxMmZT8BamQUkJA6+eAHWKiSg LnFyyXymCYxCs5CUzUJStoCRaRWjWG5mTnFuemqBoalecWJeSmZxtl5yfu4mRkh8ZO5gvPvE +xCjAAejEg9vgoNKpBBrYllxZe4hRgkOZiUR3uUbgEK8KYmVValF+fFFpTmpxYcYpTlYlMR5 z8lMjRASSE8sSc1OTS1ILYLJMnFwSjUwti3SX7royfdH65U++c4InipaLiblekzYKuvcJdnl yZGOC7eI6BcfWdC3Zb6yvsQaE+v/S0L4csrr4j2Ly/s81kUxb2k9UiAhOqnR8XDAY4ua9V9y n774uqE5qMvfnX/q8uVHP7vPUGqqWWy8frlQYESdANd1hg0/m6WMu1WCt/hVd/l3rQ9WYinO SDTUYi4qTgQA95xONosCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBJMWRmVeSWpSXmKPExsXCtZGTTTf7lEqkwffVLBb7Zz1jsjj4s43R 4uv/6SwWC97sZbNYufook8WFPd2MFm2rzzBa/Gx/zWjRuvQtkwOnx4zfi1g87m8/wuSx+2YD m8f7fVfZPKatOc/ksX7LVRaPzaerPT5vkgvgiOKySUnNySxLLdK3S+DK+NzxgqngjErFzf7D zA2M6+W7GDk5JARMJLaencfWxcjFISSwnlFiZ/8jZpAEm4CRxLf3M1lAbBEBHYlZd1+wgxQx C2xlkli4YiYjSEJYIEziQUMzWBGLgKrEs2cXWEFsXgEHiSVNz1khNshLnN2yE2woJ1B85Z5t QDYH0DZ7icvflScwci9gZFjFKJabmVOcm55ZYGikV5yYl5JZnK2XnJ+7iRESVlE7GK9PND/E yMTBKdXAyOIv3CL2atbC3sLvht2RzW63utfl1MppN1pc0eXeeeC73MTnPjI9b9M1NVZIT+82 Mk3oX1q9KiXfcunrRV62SxdpeU3bofyoXkZs2VvJJrklbrpsL7vva9iFT/ldMv2y9s5uP+2y vEubV0TcFdUVKln6mstUXv37RzvZY+4p7MlrxXSshVWUWIozEg21mIuKEwH5ITBn2wEAAA== 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)(39400400002)(39860400002)(39840400002)(39410400002)(39450400003)(39850400002)(2980300002)(438002)(189002)(199003)(9170700003)(1076002)(50986999)(478600001)(72206003)(5003940100001)(189998001)(36756003)(33646002)(76176999)(4326008)(106466001)(356003)(6916009)(2906002)(86362001)(110136004)(53936002)(38730400002)(50466002)(54906002)(47776003)(8936002)(8676002)(81166006)(48376002)(5660300001)(2950100002)(50226002)(6666003)(305945005)(77096006); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR04MB0511; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT010; 1:TFmUAc2EKeUHlO9ZOxhXwp2CfW0J77CuPDZSyneNJcmx2dFEJpgsUgj1N2bSeYVK6CE3H3wPJ1fr0nkYae6THDIg8UD5ELSqHqnqypGmdIAbMpCPwCnJyPqu2nyMPHBimiWgUsDbA58C1hXDaiN5TrtnHONUdTmJWVTugki63k3NoflHjMjLsZX84mEX85RwFQnvsZ58/Q4DDCXBUAeD04EQZImhWpep56zl6+73mxrnrnm69iGmazGX0oMJL0ssTBsFV+CxTWpKCQ4eb8bSqtTKShrS/kZpzaRYwmat25FjFArq8y9rAqziKobxQ/EPX6TwP9XZV0fbGWjCayHSyOvfawil7VdILep0DHXxh0pUvIDoafyTES9hK5JYIJNoZb9l0yNdvFZ+Tv4NAm/p8i4KtL+u1lzymv7gBY0aZBpl0ZqF/PCu8R7u6LevAdJCyLZoX50tVGJWfxcyIL7YDh1X2ELIYIIfaq3Dg7yLqOYzGj46hpynfmvsUoUNTUbhhd844iQ/iJO1UfJJk1B85cQuFtEuwJdlIlxzvQgyALw= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR04MB0511: X-MS-Office365-Filtering-Correlation-Id: cfd06aab-f284-4448-198d-08d4a2364d3b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:MWHPR04MB0511; X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 3:QAz8B9EWz3kYyVtyb9OvDTtxXvIzvbLTbvOFTYCUHXvry2z8BOOMU1VRIR3Lq6MvEOmOYW1Amyts1b9/7NlCDI9QGkjHxXAajsN/B5dYnUou9aDPElGzqN11VDNM34fuhMNsuQ54MRKFiSBb4yvOpQXX6MWo2sPA3uflkLJ+tmIbi2EDWAXal9cfqH1N23eSXMMwEtMnMI3cYLyFDoYc20eTqSdcBcw/fzEaHZWi6+gbXDK9esi9iHANFY69lpU1tO+sro+jkrpGSpi6/uC/XNXqE7ZuhH4T44ihzofdURH8e3D44GLluzY3+3WBNunDgX7Ko6Kb88RHH7BpUnW1Cr8SS0xFQYYve205Qa2s4NE0G/CTFnfTbuSuUlwzeoYG2VJKmFxnSz1+NcKzermnABVOBv3w1BZhidtjTbqPi6ZxBbEK8LNRVjkXkKBMOqsceHPR0BFxe9s6ecYYbMue/27260eqSprlyjsefCRWOd4s6SkcPmV8YA2kvy8NsfcM X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 25:SXYjgYtUHDqi1ogCOe+Agwfa0crevyNaRqv4VKLlcgzjS2AvVhoVDEdTQgikvB5bLDWV6d7Ky3EmAs2gPtIomrvt7yjvzxj/QxL88T5C/DQ0Y+BPhxikDUVYmzbJxw4oiyJwav6daBzz+miTC39S2ObxoCqJDgoiVJv3ZoFAJomnf3iKaXFmZ+cI9zw8C7zDxnMNW/4TguHIR3aU5NNhV4dw0AOxEdYxFuvQsvD3oBJ2quKCErtChNJHXBs/WDHrWBoDX6zBSgiVf12wE1juZDlOCanNdpjY6FyTMHVGolsQiVIHI+Z/nko9sy6Q3jQOX51Kh1B3OFTJ4REWXfqtWrcir7CLPEm5jiPvNaiczYfjiWIu9hffkpL9+1kd5pe+ibqkmFSB7Iz3Eoi3HKlkeMEoocAtrKOTKwTBAihe5bqCc0biH2+JmEzecqkihUAdtqr2kHDo06jmAfM7ifC1B+fxJ13HpkN8XLUQEKg1pCA=; 31:uBuaKS0nYtH2KaI58budvOToigJNCOpv3JK9u0heGO0QIDvXlQ/MDjZUjISD0ZFs5gcggyn+03Xqw2qKDxZbOVHIrJFrd7pYLNk2YxIXuwK84VztJv1w4CTN23orIt+TxDi+AwsJKdGiah6Iz0KxWDUDxxMjO9nVen4wmlLN3UX2x4pw1bnPMc/NbGYgByhOcHmSG+lMgcyxlKkDsWq/51MAl82tHvLsGkePSJu9c9zcfVXc243w4Htj/Ov4S9WOAKP7A7hdAK+UNcrMhjzyFQ== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 20:+KJecpMI7Wg3ZtRgRgLlh1HkWy6dMzg0HIJtT+sznPLSvsfOU6Gcne78/YiOuk5mGmHG0ZyIdG6zjfyURctgE5mfUuPg/JqgjuraWUnrp2574QfnQQfjhkLwP4391pBunA+7tL7Avufztq3VDrseVzyk5zRvnF9enZ/Puqa0L6FXsf0yTIg6JOWGf3m31aRgjquJ/NQQ5SJkamZt36d+MQ5MLVJJXjbphcnnZ2GkVwhjcxatxTTzmWi2DKE8YpPyr2s2fSN6QOHD/dstaClHOXGrnaB2th70q1E5fLi0RYdsDdTv8rXEzPsJqFTPOYJyOnTEHMg5ep8WMgqa4/ke2y3Whg+X/eIKT0r79SYhCZ0Vz64tWUi/NtBOgqFysU6t3lOwi6BF04zkMz9xyuDYEHfSP99KutLhEWSJKbR/rEBY1LR7qsbGsmOELqYm9LyoslyrqZU92UNKhzQSF9am3oQwaO7mx0993VhadngNI9/e6dBxv6DnB81cd4i7E0bm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(209352067349851)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(8121501046)(13016025)(5005006)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(6072148); SRVR:MWHPR04MB0511; BCL:0; PCL:0; RULEID:; SRVR:MWHPR04MB0511; X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 4:5Pg47BhTbdF5jRmPEB5xWT36oIiz7+NScL4ZKdCg3xd2rbO6Nl0tZDgXIZddzIQIGinHe4SFy6q0DC+As40ju+6lY6wQiUtjq0yvFTvkVr8rRLpLoQUXY9doS1rc2g/y6lBCnot4WcFWLAAA9PBEc4u7KhbV7v+D02BKglbR4QsbJAJKgj5jzCqCz7u8vXHtHDSOwOWMTqhDlSVzm5zIhRpNv1GNWUcGWGHzqPcOCKNaFKQxOq/Xyy4IKkOWXjC8r+Nr+yT3/N6r7nCTxhJvEn0ngW4qb6ZUIe43nVKGI9t7xnK8TspRNANyf/PtWRniw3Jjog7SqCR8eGUOa9Yih1Sb6HFLVALOUjkJsxKix0gzbbtPKqWVqNEVDKYFnxQzBxl+2SQXIT54RtymiasfxJJYCWDsStzrrUOWTDLVKkegaFQJ7EqrdBvjD0GJ7HKjxedjM2+W+6XLw88aVuw7UD1crq7PlTRDo+UNsYPs4WSRj/RBQ58wZ3ou0TUpsZclGKzNYBkoWNZtxJi7aJOOPnioHWpUNQkOyMFyPcjSq21LGSNivpwomXu6X6mfq+KL9pZMq+D8HEYSbBNlLFxgZT4O5AhhmcT0tCKwYm5RoF4Bcs5rlxcPAbhbl1V2DveEHITR/Vh43K3k63UlagmxcPYmVzxaeUtDEMoEdGLL0c+Eet73d5c9AJJ9OGSIi0aM5Vis7JMEqbVIcvBRyTL/4s9ircimHPWM+lCmzePJNabJU26+ayHqlaqIgFysQn/xSsR83/RTLdtgwmYQcUSaZEEiYEPKIwRoqn9i557I9QBwaeGB3aAZkJs4TAVSAk89FGnMiF6/WcRtRyGYtU5qFpiIiTqeeSPpMA46iIqcS7UkMxVgI6n+sVWnLANgpMIZ4/7Ntn1fmB5yd1ealBE48RhExAZ1AepoKp/pH53GKL U= X-Forefront-PRVS: 0316567485 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR04MB0511; 23:KRQn8hZUA+PTxQbgS0MtKV220D9BqyPI2QljnJtPs?= =?us-ascii?Q?RIyMU6AVrxdh75Z0tRrBy5S5j3ZsVv00hdgaqCQ9PnHY4sRBITYkOgRItf8D?= =?us-ascii?Q?2AUL+BYVqZmqiPgMrrEbt5sXLd+kb7MV7FJ6CPTgpH/37JYk1lby6j21jWln?= =?us-ascii?Q?racZh9hkCwQiNFJnoLFSyEDEsBt8IhKUEWDOFbn561D8xYOfy0+brIUfzRll?= =?us-ascii?Q?FgiSKajZdcemjIorDYq6yvzPdByWYwPahbrh0xnn3noR7E8+6wTpK++ZHgjA?= =?us-ascii?Q?8r7MybVq3jb9dwq9s72O5fwe3ceffRnPHkC3ZCklD+C2/9HbEnIoNP49WbGU?= =?us-ascii?Q?joLIwHJMNBa8LSHPlhbYd8wrqH3O+T7EGSLpgVc7WXqtbYCk/HdwqcXjeXq5?= =?us-ascii?Q?wTV6T0uqeIDrQHvblpP1BBiTueOJw0CQ/J4OHcrorbHL2EeSapfRkj18ZFYJ?= =?us-ascii?Q?TaR+zsNsTYGu7ZT3ngRVKLhwUouTSldZfIAyiWdI0U0UnEET1UTPsX0Qt11+?= =?us-ascii?Q?AERxOnIuoRG9lQs17S1oQiW6hdcz532kHv2NqBqMYjLXnGzpOQtQYvpWsD8l?= =?us-ascii?Q?+RO9qcW+Ni7RlwUCPxMr2BnMytnh6EUqpc7XoMT9RVgqfEHeG7iKLVooV3Rq?= =?us-ascii?Q?46YNAGC5nsf4eSt1v0g+fbJNRMAj1ioQd7+5iqX2KwDWvjXPofwYAkTWDP6y?= =?us-ascii?Q?Xv6hW4Gi0gIaRSG7FgGYOKAK8zoL7SSEyezlRsPIQUBYGjyyMndds3sLA0+3?= =?us-ascii?Q?ZnaqbzL+YHnBnJC30Yr8yHojKif8U404K7M73l7YLAhx6Pn02unURXoBoKfn?= =?us-ascii?Q?bxYTWg4aArPHbbwX0X8ud7SH1dok1KzJ8VJgNVnrGmRGaCzA6fyh/PFsIBIJ?= =?us-ascii?Q?Rm5+gUXIgqRgV+pCEjtKXX6MQtf/TXNpdqkPZt/YfCS1q3RRtu/0dzmLjUb8?= =?us-ascii?Q?49qKl0H3VmY4MvJ8444KljAg++iCQBpDZo5Z4oiTpEAgt31fkhgzYNxHeRl0?= =?us-ascii?Q?rP6RbrepZKIpuje+pSKE6sVtDQdckqwYGG+RoCSW7FIo8+CspdgE5Ibw9QNy?= =?us-ascii?Q?H/WsTw0zcPcMU2GnJJP4rfTCQ9W/gV/3/MNycevLVlDX6pS8A=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 6:QRFpfp7LNlatXNMatKMwXxW/SKqASdw4tkzH7OkzONOwvYRlBSMtadTQ8lWM10m082/7eyGmmu8rzY0wcA3ZgvSthXRbrRrmRhcA51/1/hdbf/5RuqpCKBNDdEtqs1y/BwDniYdn1XrhPF9D1LKgZYwE1CvBk5bAPKTOQwiYCyKqzbl2wDaC5KCqe87hL4gdNwHRgrOb03VrZHi0fbLgu61pPkF4o7gUcgOTwKJu/CGg1FMpMg7Xf6cQNEKD1eEk0KrTciQNBCLfBCyEjVqlix1Mf9/lTADYFTDVWUdRkV7CgpX9XXg6Exe1EUWUbEUiSGABgOubZfo1qwrTtjS8eh4MbcmB1uTFAsI/INr/Ym60TX2xz0USZVfDVczA9UvkZhvttUV4G4Nh+6O4rvV+QrdUQZdtL0vdv0LkUZ3QP+xY9AXiWXFyeADA18cq6IRJoRW3CrUuM9b4Tu48u97pu5LHbc5eTrBpL4MRVaVUVcdJqv2nS36ZtAAda/6YsXcEn+EjCcuaIl8wKez9s5LXrfXiAnn8Kt3wtpfEThRhwwI=; 5:K0NAMXaD2q+BHt+tEXkVW73cP7MFDI8SJjWuEvPlHc6swYcroXCb3crEKBz7iOQyreid45keA5H9iIVjZHSU58FWuw3Z6DE/QGREmaUierGdO+83ThZBoLugvDlq/9C1c/WTTgauIdmN9kVWp0RQvQ==; 24:vH7aUfpJ7OT3Uyj3ugjhOxDt2jneXIGULM/R/OE+3hgthahJw0O62szz+ms0VUrN2lh6NVYUMtReQzdZly9VDdYLE9EtFDCapb/uZCAxaco= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 7:G54BYDGLgxHxqWiZQEyrucGEjlk2Mrwr2jJ+7WgrGUiizAUnxHoH2xzb1wGPV4IVPQdgtp5mPG7yCckZu/6UM9ynzCTour4WWxZm/b7rrvH0C8m/pG8FwA7wYS//6r59M7bgDlrcG8/fX3Gzt6cEmcgYugRNxqb95WUafwo4iPE9gFKnCJzUEJs/xsgAg6Fo9nUrWsUP77GZceXFxiigHNK6500OXiBz1S+YbbEwOnKOQxvHdIJOwzVvHtv/FjcjlZbPaqc8tNHS2xpHtKha/G2tA6SXPky8afivTIO5wFxvy0hcN+N0pcESY5MPGPK/dlSa+B4V0flyVnEl3kQAxg==; 20:QtRhVEi3JZQfDlqL4kFZl1d5FrE6kOHtBg2rUCoeS78kcHFAZUWOMVC0qlWaM5r1Jcax96kyRB0BgUL62Vysxa7765EIl/ySyNYlvdaFnFyJ/1sXyIxPTEfRbV6gUYaQUUZW5CF/a6X8+M1PE6vpTXK5ENPsYJglBTIfvmnFjAo= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2017 23:49:06.6703 (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: MWHPR04MB0511 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 Move the code for freeing a TMF from qla_target.c into tcm_qla2xxx.c. This allows to remove the free_mcmd function pointer from struct qla_tgt_func_tmpl. Since tcm_qla2xxx_queue_tm_rsp() is called from thread context, call transport_generic_free_cmd() directly instead of queueing another work item. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani Cc: Quinn Tran Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp --- drivers/scsi/qla2xxx/qla_target.c | 10 ---------- drivers/scsi/qla2xxx/qla_target.h | 2 -- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 22 ++-------------------- 3 files changed, 2 insertions(+), 32 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 0e03ca2ab3e5..f3557b85a5e8 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -2128,7 +2128,6 @@ void qlt_xmit_tm_rsp(struct qla_tgt_mgmt_cmd *mcmd) "RESET-TMR online/active/old-count/new-count = %d/%d/%d/%d.\n", vha->flags.online, qla2x00_reset_active(vha), mcmd->reset_count, ha->chip_reset); - ha->tgt.tgt_ops->free_mcmd(mcmd); spin_unlock_irqrestore(&ha->hardware_lock, flags); return; } @@ -2157,15 +2156,6 @@ void qlt_xmit_tm_rsp(struct qla_tgt_mgmt_cmd *mcmd) qlt_24xx_send_task_mgmt_ctio(vha, mcmd, mcmd->fc_tm_rsp); } - /* - * Make the callback for ->free_mcmd() to queue_work() and invoke - * target_put_sess_cmd() to drop cmd_kref to 1. The final - * target_put_sess_cmd() call will be made from TFO->check_stop_free() - * -> tcm_qla2xxx_check_stop_free() to release the TMR associated se_cmd - * descriptor after TFO->queue_tm_rsp() -> tcm_qla2xxx_queue_tm_rsp() -> - * qlt_xmit_tm_rsp() returns here.. - */ - ha->tgt.tgt_ops->free_mcmd(mcmd); spin_unlock_irqrestore(&ha->hardware_lock, flags); } EXPORT_SYMBOL(qlt_xmit_tm_rsp); diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h index d64420251194..d1a039f1ad97 100644 --- a/drivers/scsi/qla2xxx/qla_target.h +++ b/drivers/scsi/qla2xxx/qla_target.h @@ -678,7 +678,6 @@ struct qla_tgt_func_tmpl { int (*handle_tmr)(struct qla_tgt_mgmt_cmd *, uint32_t, uint16_t, uint32_t); void (*free_cmd)(struct qla_tgt_cmd *); - void (*free_mcmd)(struct qla_tgt_mgmt_cmd *); void (*free_session)(struct fc_port *); int (*check_initiator_node_acl)(struct scsi_qla_host *, unsigned char *, @@ -940,7 +939,6 @@ struct qla_tgt_mgmt_cmd { uint8_t fc_tm_rsp; struct fc_port *sess; struct se_cmd se_cmd; - struct work_struct free_work; unsigned int flags; uint32_t reset_count; #define QLA24XX_MGMT_SEND_NACK 1 diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 7443e4efa3ae..25ca44f2fb40 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -257,25 +257,6 @@ static u32 tcm_qla2xxx_tpg_get_inst_index(struct se_portal_group *se_tpg) return tpg->lport_tpgt; } -static void tcm_qla2xxx_complete_mcmd(struct work_struct *work) -{ - struct qla_tgt_mgmt_cmd *mcmd = container_of(work, - struct qla_tgt_mgmt_cmd, free_work); - - transport_generic_free_cmd(&mcmd->se_cmd, 0); -} - -/* - * Called from qla_target_template->free_mcmd(), and will call - * tcm_qla2xxx_release_cmd() via normal struct target_core_fabric_ops - * release callback. qla_hw_data->hardware_lock is expected to be held - */ -static void tcm_qla2xxx_free_mcmd(struct qla_tgt_mgmt_cmd *mcmd) -{ - INIT_WORK(&mcmd->free_work, tcm_qla2xxx_complete_mcmd); - queue_work(tcm_qla2xxx_free_wq, &mcmd->free_work); -} - static void tcm_qla2xxx_complete_free(struct work_struct *work) { struct qla_tgt_cmd *cmd = container_of(work, struct qla_tgt_cmd, work); @@ -749,6 +730,8 @@ static void tcm_qla2xxx_queue_tm_rsp(struct se_cmd *se_cmd) * CTIO response packet. */ qlt_xmit_tm_rsp(mcmd); + + transport_generic_free_cmd(&mcmd->se_cmd, 0); } #define DATA_WORK_NOT_FREE(_cmd) (_cmd->data_work && !_cmd->data_work_free) @@ -1628,7 +1611,6 @@ static struct qla_tgt_func_tmpl tcm_qla2xxx_template = { .handle_data = tcm_qla2xxx_handle_data, .handle_tmr = tcm_qla2xxx_handle_tmr, .free_cmd = tcm_qla2xxx_free_cmd, - .free_mcmd = tcm_qla2xxx_free_mcmd, .free_session = tcm_qla2xxx_free_session, .update_sess = tcm_qla2xxx_update_sess, .check_initiator_node_acl = tcm_qla2xxx_check_initiator_node_acl,