From patchwork Tue Apr 25 20:53:51 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: 9699761 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 8C57A60245 for ; Tue, 25 Apr 2017 20:55:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BB9328484 for ; Tue, 25 Apr 2017 20:55:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 702CF2848F; Tue, 25 Apr 2017 20:55:39 +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 D758E28484 for ; Tue, 25 Apr 2017 20:55:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1954577AbdDYUzi (ORCPT ); Tue, 25 Apr 2017 16:55:38 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:43340 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1954550AbdDYUyE (ORCPT ); Tue, 25 Apr 2017 16:54:04 -0400 X-IronPort-AV: E=Sophos;i="5.37,251,1488816000"; d="scan'208";a="13854847" Received: from mail-cys01nam02lp0049.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([207.46.163.49]) by ob1.hgst.iphmx.com with ESMTP; 26 Apr 2017 04:54:03 +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=05c0Rj3/Ag8xniz9lZAW5uMg47ETtsEYFXFiyGmAqRs=; b=rFdeia1ESF8b8WRdctTQbf9YYmKtkH1V1jWQeefGaO0xf9yH5fyaF6NegJAl1Ojs+7m3iup1DL6E1HMF79N1VWARS+AJDojYtwIcH44Hw8YJuOhCWC6VD22KqC/raYfi17jkt6F7d1zbPMz1v/oy0pB+3r/Me2fACsQ/CBaBmDE= Received: from BN6PR04CA0020.namprd04.prod.outlook.com (10.172.194.30) by BN1PR04MB407.namprd04.prod.outlook.com (10.141.60.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Tue, 25 Apr 2017 20:54:01 +0000 Received: from CO1NAM04FT031.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::208) by BN6PR04CA0020.outlook.office365.com (2603:10b6:404:cb::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13 via Frontend Transport; Tue, 25 Apr 2017 20:54:01 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; 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 CO1NAM04FT031.mail.protection.outlook.com (10.152.90.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1047.9 via Frontend Transport; Tue, 25 Apr 2017 20:54:00 +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 7C.55.19026.767BFF85; Tue, 25 Apr 2017 13:54:00 -0700 (PDT) Received: from milsmgip12.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; Tue, 25 Apr 2017 13:53:56 -0700 X-AuditID: 0ac94371-41ba798000004a52-b6-58ffb767e990 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 7B.8A.18148.467BFF85; Tue, 25 Apr 2017 13:53:56 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , James Bottomley CC: , Bart Van Assche , Israel Rukshin , "Max Gurtovoy" , Hannes Reinecke , Song Liu Subject: [PATCH v5 1/4] Introduce scsi_start_queue() Date: Tue, 25 Apr 2017 13:53:51 -0700 Message-ID: <20170425205354.21181-2-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170425205354.21181-1-bart.vanassche@sandisk.com> References: <20170425205354.21181-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLLMWRmVeSWpSXmKPExsXCddJ5kW7G9v8RBnNvs1jsWTSJyeLG4rUs Fhv7OSy6r+9gs1h+/B+TxelHB9gtfh4+w+zA7jGx+R27x7RJp9g8nk0/zOTx8ektFo/Np6s9 Pm+SC2CL4rJJSc3JLEst0rdL4MpYOmsLY8EWkYppp/4yNTDOFexi5OSQEDCRmLhjG2sXIxeH kMBSJonpx+aygiSEBHYwSix/EwBTdGvyOmaIoo2MEj0PZzODJNgEjCS+vZ/JAmKLCBRKXNrW wQhSxCxwn1Hi+LFLTF2MHBzCQN0rFkSC1LAIqEocuLkdrJdXwF7i0IzfTBAL5CXObtkJFucU cJA4N+McG8QR9hI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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:(10019020)(6009001)(39860400002)(39850400002)(39410400002)(39840400002)(39400400002)(39450400003)(2980300002)(438002)(199003)(189002)(9170700003)(38730400002)(36756003)(77096006)(48376002)(81166006)(8676002)(5003940100001)(33646002)(54906002)(305945005)(106466001)(1076002)(2906002)(6666003)(86362001)(2950100002)(356003)(76176999)(53936002)(50466002)(189998001)(4326008)(5660300001)(50986999)(47776003)(8936002)(50226002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR04MB407; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT031; 1:Inq6W3ZYXYEM0IajLpp9L5OcGds5Og+Z5UgwphLjZjszBcZRVU4VPzpvaEWFzf30039UiSD+VB5Qyw1viUlP9+eldZeGsO/mB74Qq9aQrmTY10pKa2RVrhQduexIHgJf2ogOSPL/wzqJgZ+bEEoYMgj6yyW+Jy53t45JZB1UwHSWA6AgVKCj1KXgW+M0ZGYXbON9puC8jYXs3fTRUwSMHtRc/bsqjNCG6NTCaGlWDzNLJhyNqXy171RMziqiMQNYfqmjIoVXRsQSrwE7CgNzF0MKnl8VsRvsGMpLq9XUE2btBjk4O1mo+tQ2+sxsj+WJzwH2LVk0dJFpfZ44x9NSCt6XwEbq+plaGb2O2+Abe90rmyzpK6zfUoEscc370k3brkp9jevomZGkT8mQdwaniDBUHgEkvW6y7hoP5i7TitO6GrPh/4XGjQxzAfWYeJMmcB8BeMESN28REz/URXSCciOaqnb9m50rM5PgJsXrhLl7SGppo1kAhCEWHoFdXX3WCzlpI1Fx1Kl9k/6CZy80wDq8Rz/FkTUIZo2kamFe0M+jdGX1deKAtNijuGOmHqQT X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c52d7342-46b3-4005-91e6-08d48c1d335c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BN1PR04MB407; X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB407; 3:LGroNpTj6C1lHX4S/4/P6EzNv7X736yY9E3p2EbgKzyvCWZ2hfGhYHagXacmGlFtdYQTRZmQMKWIqEv6zhTb88y6h8HZ9+kXmJUDJqcNKZgS39NU8MpbSMYTtoxVLh9z/vIZEST6aq8VpCk8BglMPt0MMXrzjtNJI/taMs1eI8aPFzTcvePIVqy2sqawQXnLQDre5tFwSvzbdRbcJ2C0ugrJxhPGQWjQVREVQ0tF/x7sRTkRi1TRrPMGvDrZeQcjiEXiUQEe00emSrmt/pOXZu8tT0y2EMQkPsq6K9YCQ75KpkFSTJESskQEimtkMBXc3VcJahpPc29lRaumeDJNNLsGex6K5eokF9Obr7qBh5zBTsWntH4oYkUcHcFAE+i71epYBQVtqNyxCNo++IRlda+UMHdKiT3oOQfwrP1YAu27MQSXRGrtAyVFkPIzl68BEBg0tzXFDUMqokYtJjObBmpFDgbxCzgU8+BcPV0zEL/hxP88JoLF6FkuwMrfEhcF X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB407; 25:K5Dbx5sG2QCQZMXTpCUViR+N6L+vZCw6I6ZrkIzObOIrdEOCaxzh2JMc9t1Zgw0tIRly5QXJR4dv1rnJdt/+ee/yap6dVXBwF1jJLdX0K8/8nxRnfUOPCqHEVaszoTus3LcVmdc32hUc9wsHLFtvBCviWdWCjxpJ4imaeFs0n/YdnmTmX49rwdAMNBlseo6FJVfWh+a5+NwVUhSWUnrxuo03gogiULhxRZi0M/oifIDxhmqtk2dxK8qjbzIf6aYS1sOq13qeeZ0A+jbrZmSlqpUjLahLvXPvxYG+Mtrk1Y6+K4Su/jMtrhx50N3WNbRL1H90k2vavoMBsp9wxfkOUXpZrAzGshOjhgT2FJU/6z5k7I5TrnMtD9ZtgVtaGC+hJ5cU8zQKprdn74DF20QKN8oU+WCuUjy7jq/A+jpwYXE+sr/iYX0IFdmYQ8lIR7/SbEj8p5Ago88p0DQh2Cl7ZQ==; 31:CG5A69TAUYmNHZKeuuK6+UoaLhSI8NR+AV1aqa21+miqVPlXO/f1ATv2GAEfpcjplet/46vyNzuB+MkPjHAPW0BvQkl6GhAWENbRG1em1jl7OehbImLz+wNGmjZreYbQs/lamPSGurzvFPKpoT/vQsciX9HpN40jtHtg4BLWmKPOGleUpkPfYF3HSLLz1DeSBjT8vD7SnzoHVj8MlOiXkcolQkvibpo0JbxZR5pLpeRlNVy8Ol2lCKrN0CBZnNp9xCqoy58yZYnKBICftLa28g== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB407; 20:8e3yQ5cVCx/A2LtKJ8Bgushl2eKlx9TZfu4h1wRxACbrbk6l+/UaQ6d8IG6Fg2UX1wnDiHwMBJTHxJPwS1yl64oG8IeBiw3zkH25hTsynZWAPuk7eo3bWVxoni33I5QM6Th2K/CmPIobuYk4NQY8vpHfHFPrFP1qpRPBEJO5Jpe/7NQLyp52pG/HyTW0odwyYQB8dCV9GV8O3IeNvdRsY7vhQAh3FH0qHKToUXd6W1I60MB3c4/dsIobRt6rntTb9h/aR5NY4nPeL3yz6jNiVPlm+pJ296wqSITCm0frZPkCCOZYmk68FkOw4PIGSTUY3ITbsZ7KJ282zIOUka+jBHr9f63qWnbxYGp4GALWu4xAiNoBONFBKZmef0/JrpQJEIVBdTOS3iwVAPiy0/KdZVZO7eQeyCBptGbCJ0STBb+yFf9rJFW4MjZzB9E4z4z7eUTZRdskOCR2OxxwBfalv/P+rX43ga8LlUeJJY5ca3ri1ONtpbiDFBklZhlL3Emh X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13016025)(13018025)(8121501046)(5005006)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148); SRVR:BN1PR04MB407; BCL:0; PCL:0; RULEID:; SRVR:BN1PR04MB407; X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB407; 4:M0v9u8ru4JiXjwgoKPpzLYBMh1s6AVsKOHzbmB11qOjzBFxIcAuPrk5LeD2RvSmFYmASrRtll5/ETRQbWE47yqWIcgxV37Xykw9FuGR5trNo+Rx675cq3+fy4rlyHf4szt6cbPUrlCPiWjl0Te/ZDQBRtuKIcHayWTV+CLOVdOdo6GSoOG45L0+/WjBEQXfmofcWeoORkQYX6aXquB2diIyv+2BnX2oFP6HyK9lpzAD4RER32oxg3BrBZiHHyZx0mC79HWiWq480UGekToQPiSgly1oSgaToR6UHvzhbPxZFk3I9q8HMuJQpExmsUiLrOKfnYG+qj9QR7ljgkV5HyGGk0WUcPxYSWi01dYWRy30m/yMgYhY27R/f53ec4OMpjSn7jvJms5J/m+DWJNWCxPgQ4NA67Re5dBDCg8ytk2996gWrmeRZskYuXoAcczxMYAucZ5hRnDXpeEaSz/DzUgUO3EpfarIIXwLWDvfNMy8b5SYVzs8ohLPxEuHskLSCQMVTwJl546q6DLR5Hn05AgnPP/Sqfqk2HkMoTsUObjc/Elg4SYWE/b78mLlWOzVkak1N/7Beq0s5BvT7WBTkieIcfvqo4xBO9zaT+N9fqsLQzSfzvBTMPJKIyjQyCfi2jaubZHt3FZkuc866iYh1RZcNEhv/M2pXF0E3S+6IzEF1e4U8pUBXsxZPtsaSXP4YiX3j803Nqfq9xzJRPZJcyLljEO4fel1USWkbJVfdzrCorAx3jAKIPM/iw8rMMmftClAgZ1MKWcT0sR2puK5uWjpEcZBMd2sfr7TE/Xn4WhM583jlHy/jBx9xLGgvI3y7O7PxXhEAhblox8pZpPJrPSQlqjofGCgYtDZ+I3hCx6c= X-Forefront-PRVS: 0288CD37D9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR04MB407; 23:Nm8T1N0jZf2vFJOFgbke08/xpk8da07CL7QY2xAhgO?= =?us-ascii?Q?+ukOXUUN4UqyyrtDHe//MbmoqkQeuLndKnsLOySHhySSGwMpSQ8muqCQnZML?= =?us-ascii?Q?LHYqKFwL7zzQAvMJUE15DBZg9hBAslCFcprsFb10mPUbHFVycRTvmn6CsLDl?= =?us-ascii?Q?i97NjHYkcjOJg4DvoX3jPcFwpsMmvbwOoUAEsub4HR8iXTWXij/yK5Lbji0z?= =?us-ascii?Q?M7sjlFjVxsNmK+l7vELf2YHQpj1e04oSgui7XBg+7usAfIik7im3SAP+mKY6?= =?us-ascii?Q?85DkAxVuLxnYoMzr2I/J+uNEz8ZJcZLPBRm8DUWAJrZDeIJPDHkcGTMQnGno?= =?us-ascii?Q?qRmty8G/CrrCi0/mZ4U+yNgmQH4nOBl3Hf+QlchvvefLIDzPnwfNz19Zc5GU?= =?us-ascii?Q?vnl0CTxIWHZAx6/oz1ihkJHsyra19TPrL8Ks4lvDJ4V/8Q7YoDVdKksHYwKL?= =?us-ascii?Q?5NqYgDhICUnGZ8j/sBcmMg/XV97xp/BSKQUK74t8ErrJal3MfiQp8ihbMx5z?= =?us-ascii?Q?Qk72uaqvrcBOOo8Sf7O6oxqzz27pN0k6x5MAXDoOY/4LvTdPlc+MDqPcsCXc?= =?us-ascii?Q?QxoeQFjvI5G/lKGT1wVwyDqzYGe8rMhnE3KIEEeoiekqjuQhvmFlfERcjKVz?= =?us-ascii?Q?kn1c2XriaeAALcE6HXM5mKUwIbASxksy83orC/cApmW3KNNN6+3Lnb9TLwTS?= =?us-ascii?Q?xaJGPjPTteqCpyMiK+4U7zzt92H+Izac6yhL5Y8lPTlVVWuyZEcRi3LRNOMM?= =?us-ascii?Q?btDq6WJ058vb2bFulyTLx4eV0t1zBad1xTJSsH0UEI/oxAeSELC7ldX1a42r?= =?us-ascii?Q?VcOdaYEWtRSzeupIW6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2Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB407; 7:0YVPUVwPMJkMFENCQn1b2Rl7z/E3Lhy04bI7Abv8lO0XfAqyy3P85wCTWPzkadCLrWqqkEGq7WOspTSleA7lW/dVsMd1fu6pvdKFvCn3jsnfQ7ewnD2hnOPZ67NvYwnBWJblyrMDuQlnZGT0uUTigb6GOA0KFB999wPpi7WnuE8gTMT99nYYVBiBTUjyCAsY92mZcQX9nskswEOU9XN9+YOAK53fmLaX3pyrsN84xMDpP6p3njq+tLBoc2yvt98t3z2uCaboKEgpwll9V2+cMozna51t55z1tPsrtfFu/kNpUD2a1LXRdrxAJFUcFzO9+7AdAK/+XTh1i6qi7iUJDw==; 20:mVwVlDm3w2MCIN4udyG9CwHQ/OAwV5Txu1IS5G5OWJC9fVM1EQv0OJ/yH3djyzqpNlHEXLHEV/C8RoG8hLA7qdaUcW0ZMlTgwxjrIokotnLFxJVu3yRRG65EumVF6Nc8f5qLwKD+8yW2Fg4FTaZuMl2XvT/acfftwzKLOab8NEU= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2017 20:54:00.4571 (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.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR04MB407 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 This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Hannes Reinecke Cc: Song Liu --- drivers/scsi/scsi_lib.c | 25 +++++++++++++++---------- drivers/scsi/scsi_priv.h | 1 + 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index eecc005099b2..ffa6e61299a9 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2987,6 +2987,20 @@ scsi_internal_device_block(struct scsi_device *sdev, bool wait) } EXPORT_SYMBOL_GPL(scsi_internal_device_block); +void scsi_start_queue(struct scsi_device *sdev) +{ + struct request_queue *q = sdev->request_queue; + unsigned long flags; + + if (q->mq_ops) { + blk_mq_start_stopped_hw_queues(q, false); + } else { + spin_lock_irqsave(q->queue_lock, flags); + blk_start_queue(q); + spin_unlock_irqrestore(q->queue_lock, flags); + } +} + /** * scsi_internal_device_unblock - resume a device after a block request * @sdev: device to resume @@ -3007,9 +3021,6 @@ int scsi_internal_device_unblock(struct scsi_device *sdev, enum scsi_device_state new_state) { - struct request_queue *q = sdev->request_queue; - unsigned long flags; - /* * Try to transition the scsi device to SDEV_RUNNING or one of the * offlined states and goose the device queue if successful. @@ -3027,13 +3038,7 @@ scsi_internal_device_unblock(struct scsi_device *sdev, sdev->sdev_state != SDEV_OFFLINE) return -EINVAL; - if (q->mq_ops) { - blk_mq_start_stopped_hw_queues(q, false); - } else { - spin_lock_irqsave(q->queue_lock, flags); - blk_start_queue(q); - spin_unlock_irqrestore(q->queue_lock, flags); - } + scsi_start_queue(sdev); return 0; } diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index f11bd102d6d5..c7629e31a75b 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h @@ -89,6 +89,7 @@ extern void scsi_run_host_queues(struct Scsi_Host *shost); extern void scsi_requeue_run_queue(struct work_struct *work); extern struct request_queue *scsi_alloc_queue(struct scsi_device *sdev); extern struct request_queue *scsi_mq_alloc_queue(struct scsi_device *sdev); +extern void scsi_start_queue(struct scsi_device *sdev); extern int scsi_mq_setup_tags(struct Scsi_Host *shost); extern void scsi_mq_destroy_tags(struct Scsi_Host *shost); extern int scsi_init_queue(void);