From patchwork Fri May 19 18:30:10 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: 9737943 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 B5757601C2 for ; Fri, 19 May 2017 18:32:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD55D26785 for ; Fri, 19 May 2017 18:32:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A240426E74; Fri, 19 May 2017 18:32:37 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI 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 3775026785 for ; Fri, 19 May 2017 18:32:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756125AbdESScO (ORCPT ); Fri, 19 May 2017 14:32:14 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:58563 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755046AbdESSaa (ORCPT ); Fri, 19 May 2017 14:30:30 -0400 X-IronPort-AV: E=Sophos;i="5.38,365,1491235200"; d="scan'208";a="18913371" Received: from mail-by2nam01lp0183.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) ([216.32.181.183]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2017 02:30:27 +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=Lktt3Nkazxezuf+NNFelDts57hH/PB/FHccV+FjQfEI=; b=i+0XTgLdBUv5Kfycz7P8jQ2VNMGUpB9SB6xRkmsUHbd+ZXBXGqyA9blbihJFWYYJKTIe8Z56FJPFX3GCDvmzXMp4ZRrb42tSrfHMEv12PHD9hCvrH+x6KrwCO30Clb5C0Z/DyU7QLj0ANMpMf6fT9ibBhPzrYGfP598CvkDdslE= Received: from CY1PR04CA0004.namprd04.prod.outlook.com (10.166.187.14) 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; Fri, 19 May 2017 18:30:24 +0000 Received: from BN3NAM04FT064.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::205) by CY1PR04CA0004.outlook.office365.com (2a01:111:e400:c5a5::14) 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; Fri, 19 May 2017 18:30:24 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; 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 BN3NAM04FT064.mail.protection.outlook.com (10.152.93.138) 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; Fri, 19 May 2017 18:30:23 +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 FA.5A.29323.FB93F195; Fri, 19 May 2017 11:30:23 -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; Fri, 19 May 2017 11:30:19 -0700 X-AuditID: 0ac94369-548749800000728b-a8-591f39bf6914 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id BE.37.18148.AB93F195; Fri, 19 May 2017 11:30:18 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , James Bottomley CC: , Bart Van Assche , Christoph Hellwig , Hannes Reinecke Subject: [PATCH 12/18] scsi: Inline scsi_init_command() Date: Fri, 19 May 2017 11:30:10 -0700 Message-ID: <20170519183016.12646-13-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170519183016.12646-1-bart.vanassche@sandisk.com> References: <20170519183016.12646-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsXCddJ5ke5+S/lIg6ZPyhYL3uxls1i5+iiT xcZ+Dovu6zvYLJYf/8fkwOoxbdIpNo/dNxvYPD4+vcXisX7LVRaPz5vkAlijuGxSUnMyy1KL 9O0SuDL2Hl7FWPBQqGLnnLvMDYyv+LsYOTkkBEwkVh7dzdTFyMUhJLCUSeLL5YOsEM42RomP LfNYYaqu39gOVbWZUWLygrXMIAk2ASOJb+9nsoDYIgKFEpe2dTCCFDELTGaUmNm8gREkISxg LrHqcidYEYuAqsSDn1vApvIKOEhsmX2PDWKDvMTZLTvBhnICxV8eX8jexcgBtM1e4n5fPchM CYFprBILn3exQ/QKSpyc+QRsJrOAhMTBFy/AeoUE1CVOLpnPNIFRaBaSsllIyhYwMq1iFMvN zCnOTU8tMDTVK07MS8ksztZLzs/dxAgJ98wdjHefeB9iFOBgVOLhTfglFynEmlhWXJl7iFGC g1lJhDfaRD5SiDclsbIqtSg/vqg0J7X4EKM0B4uSOO85makRQgLpiSWp2ampBalFMFkmDk6p Bsbe+SofX9ZNYLjpvWnW94Vm5xUz2A1CM//tr2GfN8d+Xe42t+0tzjVrTeaseFzDt3+TZesM 3tcrRW1KWHucJhf77Pk1o4sj8daEkEmc+c38pVeXSua92/Was3Fhru62gENRHj+ilOV/Cx+b Wtcgz37zyZMNsXF1U2U3sEi4/zuSeWmv73KZoGglluKMREMt5qLiRAAdlJ6AcwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPJMWRmVeSWpSXmKPExsXCtZEjRXeXpXykwfKJehYHf7YxWix4s5fN YuXqo0wWG/s5LLqv72CzWH78H5MDm8e0SafYPHbfbGDz+Pj0FovHtDXnmTzWb7nK4vF5k1wA WxSXTUpqTmZZapG+XQJXxt7DqxgLHgpV7Jxzl7mB8RV/FyMnh4SAicT1G9uZuhi5OIQENjJK LPl6lhkkwSZgJPHt/UwWEFtEoFDi/unTbCBFzAKTGSU+rtsNlhAWMJdYdbkTzGYRUJV48HML K4jNK+AgcevHHUaIDfISZ7fsBBvKCRR/eXwhexcjB9A2e4n7ffUTGLkXMDKsYhTLzcwpzk3P LDA00itOzEvJLM7WS87P3cQIDhLOqB2M1yeaH2Jk4uCUamDM3xGkPjNLZ/kvvWJRu5lPJ69S XlhzhHHFZUd+vuvaoUciZap83q5I8G1fkvGsjTnh2o/JC9lCetkqbWMEQx0MWredT82d0fOf fdU67aP/Vvr33WkXsRY+KTz/oLf97mNzWBd55h7aq/M5+JLSKt7vwa8rt5+KL+e5U2cp1H1i ac66CxqezDFKLMUZiYZazEXFiQBaOV/HwgEAAA== 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)(39840400002)(39410400002)(39850400002)(39450400003)(39400400002)(39860400002)(2980300002)(438002)(189002)(199003)(9170700003)(47776003)(54906002)(50226002)(48376002)(50466002)(81166006)(8936002)(8676002)(86362001)(38730400002)(575784001)(53936002)(305945005)(2906002)(2950100002)(6666003)(5660300001)(5003940100001)(189998001)(72206003)(478600001)(50986999)(76176999)(77096006)(1076002)(36756003)(106466001)(33646002)(356003)(4326008); 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; BN3NAM04FT064; 1:mlYvtySc/v9VS/bT8v6of9t7Iff7u8G2zjFYs8686KtF1yUYoQ1fxWC33MB1vn4q/L16v37ugN6+YGtM7p01NUBJ0CaSy893QtJkT8zcoIWUdGXiNtIE/B7nugXJcJUaTupRsS74Uy05mF8jw3q2LNinHjZ5hWuAM7D/i3mq2Yzbm9NGlrVzju9y4eJr2bNT4EBjlNEBc/uAuoGizEU/GgB9Sm+c/0X8mfH/ibgcfpwbcURhBvXmcXhzsrEw84MccXfOrddsvv/VPBdPjzqo3epN7Ka4vSKP/kZP1jTTayeJL3WNPT+vhaMlWdV6g3+d6B4UHwOfCWt0hWp3Z+HSFlrPlwRvORVLa+Qru3/ZFw+WcUTT7+p3BQ69iLj68Ik5abv8LOA1VkNIJEea5xpr9FwWABzQxGbOIkFki1W1llFqz8kp5VQpiU/J3PfstTp2PxYCD2GeUFAkY+YJqlhMOhgZtkQ2g9Ll/G2H66zl5ff93neGdUzIEY0veEBA+6kGPPQtVXmk0XlWuC6dscVi/ZsyWe0kysXO5q3D7oHltNk= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR04MB0511: X-MS-Office365-Filtering-Correlation-Id: c4cc020a-e79a-477d-527a-08d49ee51d68 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:MWHPR04MB0511; X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 3:/SvFVGZ5183p2u1Du/3eU/5KiM7sys7bOuycFkESqAS6RuqgjhPj05qj/C1iM+T6l5UmJaPbqRFWYdST8tl3dPg0wjByTwnRYyKESXQZB6G9V7smNXNbbfzl4Fr4/HiJvoxG2Z5bLu4IMEChuhEjzPRUT3ukh3j3iuPp//4Hnfa8zcABMFpt8DFdh2rnWCHDJy0RUcFBZxti+TLEDfl4jHHdTzxR5y6FLGoEJi3/nwwAEf8zSIBQSTL/1/mpevHmCUfZX9vnSeB5g/05rxJsAyGiNRWr+Najq3GFCKdPorXQF7mIkezwAbTdcKirMs4gFy5oyJcjdlovPBSXgMfATs3mVk+A9mjx6CTTC3U6Lahb0nBSEO35vC9CuZPYN9eSs57anzBL0+l/W9zLyUFi6wUIXktDkAjZ4UY7tvXjsq3nuCS1uXyE8cinIUbpZJun45TMppLvH6+0p1WiaIS4UKSVeJejkff7GKo6T3onz9V9f5BZWbX0dXu8rVn1bUcS X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 25:Nn7RIElP13bmKYA6gvy2HG2uR0NH0GNIHhqEsrdprwr2CjTOP+fWh1AsbhSNgicI6M3g+zIjMFGWBU41GQbzPqrzpzF9q2/2wfZhOop+bmtXkPFNofuN787453oT5ACubAlfO9voCuVPAhpjC2x9wm73fy+ajOPKZe7GKW8juXWmuif1chIO7RUrK3ZxJu74wFn9lg3OpVeAScZsIJ+QuAj/3JUywGZ5RKkQLmDA1dnsfJTEUZxzcEzD271B3aRpFTjm7fq782BEpJYfzbcCgIterxAjtaoSNch+QX8oNCGAJrvjjSG8aTNOPpBSiKEs/NKgGIWfKn+sQr4yin3IyDQxflMwe8Q57sPmFRS9rL4csH+C+e+7evur0z5kE5vzw2t6BBp9lyhbRiPmBDq3QJ+W6/BfOkyqcQEtFMNh4HvkW1cDx2XfsyIzUg0dS+faBI38ox72uqMUWPEVx0DVBnOh1/9gEj9AUeuiWZRqRJk=; 31:/eXVUSCDgfRoLV3o/AMamt7ezdGzvzGT0OTEwtNYa2tlSPvWfiZyW2KCd5StWqn2OMKOm4Kvm7InXMX4W6fHjijrK55KkKCMz2J/JlLDooYL4hWFyYLWbZkmxzAVKRAj0VO2FhvDnny430MaMFUYjGgwTcJPLiuMGhUw1KgUq9RZFTiYfTy7WxHqz1PGkrhKcARoHsq+JcxYIDeSp9szs6A5/rP5dydH8KOOo66QjPzIUJDbEEi38e84l5KPHeq+ WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 20:U2vIx9ksgCQBMmEjN2jPkfRrLbBFe8iMu+YsGrNOMpicpsH6w1QBDULi99MPZq+YgofINmZRUaFV6xcGQxiLIjlQ7tJRNIWso9M+4UhzN3fr/vz5N91GOk/LFOH+lsaPWmv2v3e17fQ4uM4N8NUWN1+WEw4l1ej3ebQrFWuRyrTBkDlejKZsg1s6QFWOyYQuXKqOe2eJwyU/trKn6KfHQLrsi9qRZbvtnXmIFEb8iA0A2yma4WVylQlIHo2UE6q3cHMXJAxo39PCnO+d1tRv2gss3b/3LZSD7lHaVq/QLSUZrdOiMjlhHOOGiMPZc/gAU0J9MYxGFV+FKf1hKu0bcgN5/756B2Lp+HU23cRAVHt6zWqep0J50npd+RFSQ2Bs3YcG9Nlov6JWXumMfIVEEjXDRFTy76adPIdcwEtjVL88jZfQBinAlvuOoKF2wHGHWUoyjOTD33tSu0eT5a25cPMMYKv0hYNqNHkvyrsr5/wNGTBIIMtzFD5fDs2lJVyy X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(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)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:MWHPR04MB0511; BCL:0; PCL:0; RULEID:; SRVR:MWHPR04MB0511; X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 4:xHBQxoBG9Uw2rzTygMs5Q1YnB9v3exz2mz8ttkl1k6FJxFQlZhChtj0RcIgC97gjLAQV+XxKF3bXjC3zLNefAe84CKnVjVvDZCOpx3m0LISdGTzIK0zTACG7vYXarQQXbC5LDK2jJfynuPPqVruJCg/LBMt5wbsAMSOX2oBwOcmIKIOOIV8joAtuhpJddyPEWOrh+bbQoROD//qKNHyMsuuiCb5q8D5Fj7EMXMPnUEepJQf6e87xQqmJvewMbWUVM57RF3ImTPklNQORNXlY7aM96hYWCX77rUnDCJNvu6T9PAF1pyKWZIsgYl22h83utk+i0lVsXM1LMzyZw2+kLgDMMZ+yY/6z37AmWfYiLLEDgt4EuOxLvR/1NThOVF9ibZk9ngR6ZkxozS12iSTuScQ+3ovf28cwAs5EKnvhIf0sVT/EEW9LkoDF51LIyViuw5pQ0vc4t6SUo+ZG5HwPhELd4k4tDUWDCXKhsBsXTQWzGKouCkpqmVy9LxwjvSW3YsAo6/4ZOdvdgThQPeECSAcCJN56CfLkvx9uPpGUD7TT7ryM5nAnGuyXo9nnKcnWQ0yoRBrucXUKZgWpRfq6i5UdalSldD80F5aZzySiyZoxvPaD7aHNdDtDEVE++dP7PQeYQ9bCzfhEmX/rkTZWPwGRBlfSvEtLYJ01GHPr/w4OS5MIYEf+TNSeO9Ev3rse+ZXYGXDTv2fZ40UdMfm0ceMtNKU18r51s2xhttja+KriHZ92yog/HgN8J8LOjyeKlsCEEcprcJty2JF8DN0PFHYYW3YLKSicany5SzcGuHrTT6Pk7auZKQBYnx5cHbi4/228Ple5V9YJ0M9Wfs4c7Ou5waqH+sVdZZx69SGGYQSLJTbaf/kzAEfjELpVj6BA X-Forefront-PRVS: 031257FE13 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR04MB0511; 23:RLPdohSFsn2IbfOZLgtdqUrRDOMhRSy/nWfIVlzvZ?= =?us-ascii?Q?fW0UEVlrL0UAVTJj6KJmcNOFux791RhIrvqRfjiEbAufsg82KGb3KR+jZQbx?= =?us-ascii?Q?cIccEjz1UHVJE377tMWkOKkdXFTReGPii++4WVXy013nI0LRNQ3H1IcEfi/7?= =?us-ascii?Q?AiX5+T3NW2P106jjAhM9jzAVhYRyp5aihPSBmytPyebqJGNj/1c5NK7ZAH0b?= =?us-ascii?Q?V0LcILZXoAty3z2jGQQe4TtsfhUI9yBd9mSbPWtHegXNYoX3F+dCEdXsfGuU?= =?us-ascii?Q?PRWKmp9si2k4J5BWq3O8msC+VB8CDwDYZRshOvl2rawq1VM6/0KlJl1wKYYG?= =?us-ascii?Q?UoeZe9z2SwfepQ2AQrofOqLkNR+UrpYYqqE8RhBLfRchDtQ3RFny0g1V0uhJ?= =?us-ascii?Q?TfczaNl3/C9Dx6eO+xEBWc57ziG+jlGSKanQDCLdr2QlN7qOTESca/Vy36bg?= =?us-ascii?Q?aOoEoAluKsN+yi9rxTX5f77wV/gq/ldFm89t+bI1NU99MENsoMUDSeRFJ+ls?= =?us-ascii?Q?tDtKBMYPLSrwPBS9aXpH+lMqrlJoccPTCp8IlmQyII6+QuI9Fky+2sBgONPL?= =?us-ascii?Q?V/NHyuy5OJuUbiSAsob0a87DBSrZBYASQhADLd0lMzeJaIu7Zy3gT/BESly/?= =?us-ascii?Q?tOiR0LWUVWAnMXnBSgKikZTDUIakosnHfX7RONeAIDpYmRRdo9WH5uPTInVs?= =?us-ascii?Q?rFAOpHOkn+awnXYIhdzJGVWFN1/HsebQKGCzwzdQAW1tZ4C9XUEKHffieyM8?= =?us-ascii?Q?cWS0mnb/qEK/tO49wsS2YD0gvf0xS11GnAXGim4tXgykznHvrCgGnVQZfENh?= =?us-ascii?Q?UilolPkBRyr1Q5eP8ZSyE1DnTdpIvQ9n41bT63WRi4zHwK4nV6lLO5vGx3It?= =?us-ascii?Q?6bxi/l/j5mCOEl1MCutBNZLHx1ZYZriciZON77iOCdqqofw7ZArJuUGneybr?= =?us-ascii?Q?fhAye4lW3KEKOpy7J4cEK6lALvsnGKiGVsT2QepPbGkE0m+Em0mDzQt0n62T?= =?us-ascii?Q?IVqlysCx/sKrZAfcos0YvPMIAT5OkNjDz70GsAOTEUm+Mo/h0PgfRrjNoOPT?= =?us-ascii?Q?gqH/OsEo1bCPhTtV37U9f26G1Io?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 6:A4zCQGHuPLZwuFm0tnBItZ1krUTl4rio4SOLgE6oZZhdlrQmCnqyRUWbiIIPQ+LIMMVOWO13jsHd861tOMLeEQoqxBpMFvBK/cU9XMdSJzf+ghJ8TlantQ3REXszhSQu33rhBPhf10tdRrtck7OlAfp9mMpQ/Uje6I+nqx5Ac/PBTSlE0bTCXsq2IVgPO8DPa/FwXbTvYWJftoEQ9uN1TCy8+W9n5r28srA8Pw4kPJrCsIMTTogmyqxSqwix7fpHTQtrBcgpSc2dDKxuCWeBcgaCCni0rKyhFYWcgxT44iAGEYIlEEY1FI4b65/K5a/8T9sbCWmooKAnc+yXHfNDv9hs/fm3qsIgBdC15YK3KQDjrcNuWwuNFZNnXsGVK/g1VwplDeTpj4lQUrAvjzOfxbhTusjXdvnIX6msuWEQwn6iQHFHusTWCdvXfKRc2IbqPFaeVZYmS0eNieheaSOXsK3MCZk0RO/C/l3VuHeuotg4RI92tDRvbAz7oM6Wo34YSNuUICtmqWUbv75joZUSr9pCZCiOBonwiguBjHxwMgM=; 5:yLt450o+MgjfE5kKBMonmzbz3bGqBS0CCsJF50D7PD0CWrejBDbmVop1ib+Arg64Y1IAAu0v0zdx1FCPHDVrqpcLnaxPpCf+xAB29PzO+WCkbnxmOOfuIYz0Q7ycAy4VtsFb/Ux0fBPL7afua3GfNg==; 24:QEz8fQDUKk6SWGe9+HaPlUAeGDfS7rSZWcDsgUkD3D5nmE6x3+IRMyl2tBotonoHUTLKaQ1hF9zmDjGT6nEMbyUU/Dq3pApwUMYo8sOcnXE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0511; 7:k1s0gzA2tNqrS/P0V0OGqzJqJ67vdis6zkv9NwZPxbGBcacjwx2+454yNb5ZCexSH+fuiOjOfo1fUD/Pr1eKftIQDUaMYd5ELNRQ99uVvzqe9KF5/9uv/1OHUN0y3sfxTJmpFDmRmI9hT3hjD/wqAg5/Fuxzx3qF3ywutpIEaoOSTo4q195x08sayNjWUKax6qQhINXkZorQQQYdG/V8z39LSCD1lDGMa4PgK9ifg4BevfD5FgfaHzUJR5sKJgk5cZ4VCRLv8QetDv5l0WezBdulHf9WGlIxFEfoVErimln3Nq4XtNJh2EQbyJBiGHE8iOtCova51CGxnBqnrgMGsQ==; 20:QoXJV2lLvJ0UXDNM0Ce7KYg4I3Uq5T00KLM6Tfh75fOCjCv6MKUJgf4oWkvc02zAQzefMeV3XdhqAgkFMfQOmHn8dJe5Vv++WLrzlFUlko+Wm1NSeKwzcZxGBMtUdo18wtR2bR/822jO3HU73x0/+i932D3KbbFjmolkB6Z3VHk= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2017 18:30:23.8376 (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: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The two drivers that use the per-device command list, namely aacraid and dpt_i2o, expect that that list contains only SCSI commands and no task management functions. Hence only call scsi_add_cmd_to_list() from the block layer prep callback functions and not from scsi_ioctl_reset(). Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/scsi/scsi_error.c | 1 - drivers/scsi/scsi_lib.c | 8 +------- drivers/scsi/scsi_priv.h | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index fbbdc345be85..2b7221bc0f32 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -2293,7 +2293,6 @@ scsi_ioctl_reset(struct scsi_device *dev, int __user *arg) blk_rq_init(dev->request_queue, rq); scmd = (struct scsi_cmnd *)(rq + 1); - scsi_init_command(dev, scmd); scmd->request = rq; scmd->cmnd = scsi_req(rq)->cmd; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 68ce053b184b..b2e3dc22ecf3 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1171,12 +1171,6 @@ static void scsi_initialize_rq(struct request *rq) cmd->jiffies_at_alloc = jiffies; } -/* Called after a request has been started. */ -void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd) -{ - scsi_add_cmd_to_list(cmd); -} - static int scsi_setup_scsi_cmnd(struct scsi_device *sdev, struct request *req) { struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(req); @@ -1347,8 +1341,8 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req) goto out; } - scsi_init_command(sdev, cmd); req->special = cmd; + scsi_add_cmd_to_list(cmd); } cmd->tag = req->tag; diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index c11c1f9c912c..67d1550d8b64 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h @@ -30,7 +30,6 @@ extern void scsi_exit_hosts(void); /* scsi.c */ extern bool scsi_use_blk_mq; int scsi_init_sense_cache(struct Scsi_Host *shost); -void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd); #ifdef CONFIG_SCSI_LOGGING void scsi_log_send(struct scsi_cmnd *cmd); void scsi_log_completion(struct scsi_cmnd *cmd, int disposition);