From patchwork Wed May 24 00:33:53 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: 9744759 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 174BB602A7 for ; Wed, 24 May 2017 00:35:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A9A52885B for ; Wed, 24 May 2017 00:35:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F33042886B; Wed, 24 May 2017 00:35:58 +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=unavailable 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 2EFDF28867 for ; Wed, 24 May 2017 00:35:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968980AbdEXAfx (ORCPT ); Tue, 23 May 2017 20:35:53 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:35328 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763399AbdEXAeo (ORCPT ); Tue, 23 May 2017 20:34:44 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="21089170" Received: from mail-by2nam03lp0054.outbound.protection.outlook.com (HELO NAM03-BY2-obe.outbound.protection.outlook.com) ([216.32.180.54]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 08:34:30 +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=6iqxj3rI42FcLYCITaWEnAyT9QKw7f74uy4V6L27P/M=; b=R5VYVzO9CDqdZ8IS65bnOsxOiyTLP6u7ZnK1/nPbrUZhFK+EHl7+8woqg4YUUCGFeii8jtgxzgRpTUoNeDvkQCxShW5DozQUHLslptSLUyLgJ8dH2KQa1dTmCh5xPCeY3dYyJktOkwpJQiedISs/wPYZtvCF1r6YvDfWiMYOWYM= Received: from CO2PR04CA0129.namprd04.prod.outlook.com (10.165.95.31) by BN6PR04MB0499.namprd04.prod.outlook.com (10.173.201.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Wed, 24 May 2017 00:34:27 +0000 Received: from CO1NAM04FT044.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::201) by CO2PR04CA0129.outlook.office365.com (2603:10b6:104:7::31) 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; Wed, 24 May 2017 00:34:26 +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 CO1NAM04FT044.mail.protection.outlook.com (10.152.91.95) 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; Wed, 24 May 2017 00:34:25 +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 E3.43.45291.015D4295; Tue, 23 May 2017 17:34:24 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Tue, 23 May 2017 17:34:22 -0700 X-AuditID: 0ac94369-166ac9800001b0eb-eb-5924d510b9e7 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 2E.93.18148.E05D4295; Tue, 23 May 2017 17:34:22 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , James Bottomley CC: , , "Bart Van Assche" , Israel Rukshin , Max Gurtovoy , Hannes Reinecke , "Benjamin Block" Subject: [PATCH 04/31] Introduce scsi_start_queue() Date: Tue, 23 May 2017 17:33:53 -0700 Message-ID: <20170524003420.5381-5-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170524003420.5381-1-bart.vanassche@sandisk.com> References: <20170524003420.5381-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPLMWRmVeSWpSXmKPExsXCddJ5ka7AVZVIg7mftS2+3LzCbLFn0SQm ixuL17JYbOznsNh7S9ui+/oONovlx/8xWZx+dIDdgcNj2qRTbB4PDm1m8Xg2/TCTx8ent1g8 Np+u9vi8SS6ALYrLJiU1J7MstUjfLoEr4+X9xywFn0QqbrSqNzBeE+xi5OSQEDCR6D++n6mL kYtDSGApk8Tmh42MEM4ORokFfXuYuxg5wKq+/XaFiG9klLj14Qs7SDebgJHEt/czWUBsEYFC iUvbOsCamQU6mCTOvvnOAtIsLGAs0Xk8B6SGRUBVon/dVbB6XgE7iUUvO9ghrpCXOLtlJzOI zSlgL9H1agI7SKsQSM32CpCREgKrWCUefGxjhegVlDg58wn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ttributedMessage: 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)(39450400003)(39410400002)(39860400002)(39840400002)(39400400002)(39850400002)(2980300002)(438002)(199003)(189002)(9170700003)(50986999)(53936002)(2950100002)(54906002)(6666003)(38730400002)(47776003)(5660300001)(86362001)(8936002)(36756003)(106466001)(76176999)(33646002)(189998001)(77096006)(50466002)(72206003)(50226002)(8676002)(48376002)(4326008)(1076002)(478600001)(356003)(5003940100001)(305945005)(2906002)(81166006); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR04MB0499; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT044; 1:xplQ0HSDE7znWh1kV5fHDhNBkqQpT3VlnExUSO1sAze3/CWogt3WtylzAAtACgsoKzSsCMD7v9Uo2CrJFED4MQod6Hz6sIfzLbDZrHV/jnFqzmKt/Qe5z8Os55VHDK8VsHjh+5cxKWks1H66rgo5ibGvYP3InDOklvoT+Y8bumgUvBzxmZG8yDEDmepKGbDl50rgU7b5oHiIgTGM1TyNKFffM85+vyhSdMYRSmU64Dwlz+tr4R6XWLUzXVnHxqkuio9qr3rhevevkCaD+PuELNKbQu2onthpheDYxzXckcUY1YNHFHAn8KonTwke+5i4Cit1zISzbnHK6NqONgpL7xB3vmYJ2onqpuPXKC3ABW1htv82GFwWqISl42Mkk4rEnxmSN0iHjGPfDM1Oge8VkbAtaiqPwUcaDZ3n86QcGU6A6esQS4DlRYoGrVih1stLQRuZvbYFEzzNn5MKG7ZCygEo42Jf9q30OC2eeRWcRZr9OEYEDl6CSTVh/fPUIg72gaQXv+jKhbBWQSS7FvUnf+ZC6UoZzVXn6bDFyz/ZuXKRosZUyj+pFS/P1aLorxlO X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ea75ff1e-ee26-44a4-2219-08d4a23ca1da X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BN6PR04MB0499; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0499; 3:3Vk7cxDWAqNoh1HUY599j+7RHoRhWhDO3TyiPbcEIAL/W7q8PPlxox+k5l5jX8dhsvB/BLp6o7pZjNcv69s1ePsM20ctiOTssmQC+mrSmMK7dbRRXO/Rd88ChxSK2+dZPGLr3ZDrePC4hp98AlfGISlxNwECRNBPi/rnEdP+pMlr/crxZwzl5RiBOwZAkDRzylK47zh3wZnqoS9l0duWjXKmVYOG0Qrpa/Vo0skv+uFgTvGOvrYg5TRF1USmAUNUD/auc9TgGZBNFYwEZ8DwGoCXiJTLh58sWTBxTIirWE6sS8ha4FuTthh3RmHrrXL/Qyag96JuiO4GTNRjv1/SEXnCb96jQX1CgfDLc7ZYyDqKZGaRR9kRjP2tCl1lWHLmcFRHF9LrDjWbaaFNvLiVfhGQXKF5ZcVGKSqBdAybe4opwxq2WHnEfswNmq+5naeN7HZmxS5zJCvAkVSDv5OoIiYL2wR30Gwc6+iApUl8ox+Vo4VjmHmvrqmCYGs+uam2 X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0499; 25:6yebi2L7ue0AiCIUBkhnKyyd8boFgOdWTbCHBzbRNMFSBkIIxCuS86JP/lbCzo7BWEO5thzhGfBqLT7kuhROflScXDMWcsDlenKYN18hHaTsNVPAyUS1pzj5Tzf4GkVtWS1squikmuF/i5u51t9yK/6z85hY1qSx7XxH5qOGStK4NxI7EmCt+27heje2yt+p5o6Mv/32aayK3sWQTeZ4AB8tOab4RcRkf9w4Ug3bUspAcVP+KI88uKl4DU5MeGAnRKDSF6sb8Qb4mA390njKM/bgCRCoRYn/12X68uNtfZoponnCoPeCnAzq0tpzRiL7hDPrp0l3s8IKz5odq5cyXgyxvx6MR9HWHLTlRREMwEGfD3Ms4/slGhLyxtpWvwvz1ZTwj2wK1U27efdfNBryjuXc2DuaNYZFhbNxMcVS1RkBAMwp587u3eDvBzTaTMu80DfWFjjbqaJ4as7qutThuhCTgLKbga6rqG1eDHQhDlQ=; 31:oWq168TB/b52vMb1sgYVxJPPYAGMwki5eFi4bZgRjUr/irxfHeuVd9DslW8dBfO7J3pic7g618aImN3sofrJIXniSKfR8lo22pTf+FApEdorwpldHgKy7oz/wLWOdgZ8XenS/U6oJdTL5x1yWL/LqqGZ7y7oBZWm3DVNagwvmtt/4h5bxgoi0unyNipaWXf3mQvziNNSeETIXJkDV17v2eDPxGWZuUxESxBGG9uf7/m7AGXYPdrFY7VLhZRfQnuXdctO53y+wXJU7NmN/SsrHg== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0499; 20:vzJZxllHsJtSX2IF4vwRfAPAEBsU9PJdTUt4MieMW1L+eHNRwq3LqW3/HRZZDa3BRW8NXB1KMzQBlDeEnocNTOUQlz1Y2Xv2qiW1NCFY+k8qypnm82NZ6QbSq6NcXgcMBsAOhQK3w981znqR3YhLj+2bA+pHKLJ9GnyttvMf9yr0OM/mEqOo2bFNZVgfNRbSEw2Y8osF6438YCoEeg4ZjDcHPaO/+teRO/3HZr+ifkz8+VShLHqa/k+zTPWZ0MZbb7ovvQG5Z+H/UiXG45HKaY5z+mmfFPMJZg54YfwKuE6r9u/c90F+nPvZszmxeriEX2RVQlyxMdV50CcUcGRd9L/pPDTGV3zD+uDqTPWh7w8C5Qh6Q9+ajZHg+vLDAntotNv9iw3szZDtnYeSdTAWlDzT7i9zSQ8chdgI7fE6GRZo5gxmn7jM3ZpzjtycC5Y1IYH++yC0N4dXS6XniX/W6lrbDdChNUsxSCoLNT1m9pagKzPZlMaJJae/I4yR1WFl X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(104084551191319)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13016025)(8121501046)(13018025)(5005006)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(20161123560025)(20161123558100)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148); SRVR:BN6PR04MB0499; BCL:0; PCL:0; RULEID:; SRVR:BN6PR04MB0499; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0499; 4:z0tDBS8K55KoJ+bB5aNozwARGS+A4lYXpz1Kih34v0TG71XVDR/DPvcQU44qmycokqwGKFRzC7a4ZSEaFHu49cTVcl21cXtw28GAdPhl8/jX9DkJtdZhab7vuifCtoZ4PYoyyPO5jT8syXoQRwtQU0E8hPi1KZOpe1ROrenUORMIrhTmOKlvtkY8R2617k+MnqmhDd1q60yBAzkIZHyIGkHqINNpc7BYX9vcFR5D4mK4SvawKo2xhmbS7+maPCCgdm9m1mMzrKGXzKZ+IQMwvbKJ10UaXjoL0EV3JAOy9wFfZHy+zj117cqB/MlK7yVsD50Rsq4gMAKtFmIjBDiPDETOn/0dxajFT84FDtRijJodi/Wd8CpOnGf6kQ8iKVe/t6zRCZKkVCUvvQAGViF5j4z8bsgiCeAEFUpfCbNGFj9blbwNfEox4cESuquc30zd6hPI+Wh4SukKzWIRsE9vBYESdSV4bM+EVOFJxT/JzSi1uOA5+4If0ZpjaiT5T3QzjjdYSK8+TZJY6GsA7F+LEZtWIEDtmDlyY617FfU9iCbzcq6Q1L+7EbMt+DMRF/j37fbdpPNn+HqNX2k5UOPlhvGY46fT/y7yHGHrOM7qQMAlHbHVYSYZys+vdqOz2ESzynxR2q20ro8EWU/5HajJOmVhOLJfC0IYOW1DEiEt36rszV6DQLvbo+Fuv/MG0KBExJ5h/qBnfRMa60evMvF3Jvf2CbOo9nYzupqBwD0X8K0zWnc8V/CckPzSYNKGHlT+0ax/GwR/a33lIysc0DnvfukcwVibq5Y9/FZHKVY1LmkLhwjLiBEmgGd8MHtfrnjblzwlOOCIM2cNpFJrU1DdIkgPXl7rxgLgYzgg4Zf5LUDatXqpsYiG/bv8GcK6hJCS6Ta/CKu26tqzudxM20vyiz7evgTJYiBdGuZsmFvE3l c= X-Forefront-PRVS: 031763BCAF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR04MB0499; 23:TeDilTw/UdI2CvBErWZeDfopHAGf7H4qQi2YYHCzl?= =?us-ascii?Q?N0+EKe0zg+QHio5DmBoMJKrrBlVAYStE94ynl/JFIefnOqga0XEJqT3PGGzk?= =?us-ascii?Q?gq9lyV3YzqC0ZamXI6eOG3ZlULFvSlxp9hCFDZIhsH7+wls0ckvVbQIDzl5D?= =?us-ascii?Q?X2A+ENdW7uO2kmZpnKBEETI9soKGHRRBF+Sao2AjwpABxtjrJdg/aMhb6rvh?= =?us-ascii?Q?ue2Eu4YF6mhRaHHOzadUUZCJjXfrJ0mR5Aptqii1DOZG8vPGvGGdwBtGctrf?= =?us-ascii?Q?9w4QlKP1EB+h86N4jpbJXHB40QMqnQTKPlALZVhhT8eCweHkuLeEE9/F7Pvw?= =?us-ascii?Q?W8jQ5+5rti82EX0GRYHhtU6i2yMsPtVYLSYVET9AEPAIw2vAIjI+e+h8ZxZg?= =?us-ascii?Q?CI3K3UNnJ8G4hMQ9z83lrzQM8dANcdThda2HeokX0xua9i7LbBDZHPD34rJc?= =?us-ascii?Q?W8kc0oUtwJcXaoNRsj3cZi13rRgDvx4epPSiP28CnZO/VYi/viElxggp6GSp?= =?us-ascii?Q?qN5OqpIcRmEb8XFbCTad4iK2eRmvyWfHG6Grn+BVuijlsV3pfgg0ZVATmiJm?= =?us-ascii?Q?Zz1PM3u/orf4Z2PoVMuhaM4N0BtE040Yf+oPV5BFoXFG3txlqExIGofQLOPw?= =?us-ascii?Q?LWld2Io1Div/jm39iymXym5jbymACzo7Hcs4pU2aRJqBEj77K598kcZ2mbP2?= =?us-ascii?Q?HZJzhPSAQlVtkGh6T0tZvdYwR+35/Td8tnQF2ivWrc8auDjIjfbMld+6eQqQ?= =?us-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pg5CjtM18Pu3rSLe+BIhpk5FPIwnQzieIkbj74wFbFVMg5tY+Jw==; 24:2ph3LggSJw/ym6ud2Dl8a9BYTAEJ0lpOCVZEZHiBKyfXQ+NQtu2ogZ/9Yf82td2HzP9DJHJIxFDac61ScITkYpuhfjE5NglfjxYHOnttU1o= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0499; 7:LGE10+GgcSJwkhbhENZ3gob/p4eQEPeAoV+b0x3zC42Z5AjypBjiKij510AsAC/uZnlvfFBjVEQwXnJMZZyCkVFIx/Imhkykix8Xs/qJKHtEn5QrhlJ5KuH6UTWvYioDulnTxHKzc1T2Lnatb+pG+KWC0xHLOgj5Pw3ZH3Deb+epq+Aev0KCoVIkM27GddFqDzYxibMKyUna8kefOdfVtMoAvKLe0xaiQPozCyU4p50wawK1dlfPqibLwjPEO4suaIlMy8QE5/BC+NR9uMJb7vJyj2ioXy1fWDcOCjof1u41qBzxg5Q8EwotNkzUP1c0xyZgYiL0iAfd3oUUWdHZEg==; 20:aNUflU5iFWX7WTMCAnSa4s40Q/KmBXJfEiWyH+9WHeLCCTuQ3G7h7AkEkva/LZt11bm0tAyxxrC0dIzeDxGdOv5LtukIkqGlboU76JwTMvueVYO+n7xsuO6cuPLmbSCitrdShJ4AEIyVYIM0VybPDiNbTeIhq4E+J4mD1J2/Q2I= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2017 00:34:25.4028 (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: BN6PR04MB0499 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: Benjamin Block Reviewed-by: Hannes Reinecke --- 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 3d82cbe605cd..0ee5c2133e4c 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -3019,6 +3019,20 @@ static int scsi_internal_device_block(struct scsi_device *sdev) return err; } +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_nowait - resume a device after a block request * @sdev: device to resume @@ -3037,9 +3051,6 @@ static int scsi_internal_device_block(struct scsi_device *sdev) int scsi_internal_device_unblock_nowait(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. @@ -3057,13 +3068,7 @@ int scsi_internal_device_unblock_nowait(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 59ebc1795bb3..f86057842f9a 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h @@ -88,6 +88,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);