From patchwork Thu Jun 1 23:27:02 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: 9761351 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 87126602BC for ; Thu, 1 Jun 2017 23:27:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 757AD28524 for ; Thu, 1 Jun 2017 23:27:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6713628544; Thu, 1 Jun 2017 23:27:33 +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 8BC3B28524 for ; Thu, 1 Jun 2017 23:27:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751167AbdFAX1b (ORCPT ); Thu, 1 Jun 2017 19:27:31 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:19781 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbdFAX1X (ORCPT ); Thu, 1 Jun 2017 19:27:23 -0400 X-IronPort-AV: E=Sophos;i="5.39,281,1493654400"; d="scan'208";a="119187212" Received: from mail-bn3nam01lp0178.outbound.protection.outlook.com (HELO NAM01-BN3-obe.outbound.protection.outlook.com) ([216.32.180.178]) by ob1.hgst.iphmx.com with ESMTP; 02 Jun 2017 07:43:42 +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=I96vgiR+jnS21mmZqBTVPLfjKcMWWOsavmlJ/8X7Cw0=; b=RCG5fnuD5afdYAQTIvblzmiLFPp5E+m7goiq4y8ZAexX3TOsfeR4k79CjQLTgnSCsfb38sB3sJkruKNxLpO/9ZWs3utaY99FN+YbM61F4+hWUvSIWGqGUAVSfoi12ZYdUjFKtbXVbad1NL82yan2XIx9rVSxj9d6AtCXmzsgnow= Received: from DM5PR04CA0030.namprd04.prod.outlook.com (10.171.152.144) by BN6PR04MB0386.namprd04.prod.outlook.com (10.173.198.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Thu, 1 Jun 2017 23:27:19 +0000 Received: from CO1NAM04FT031.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::204) by DM5PR04CA0030.outlook.office365.com (2603:10b6:3:12b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10 via Frontend Transport; Thu, 1 Jun 2017 23:27:19 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; lst.de; dkim=none (message not signed) header.d=none;lst.de; 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 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.1101.12 via Frontend Transport; Thu, 1 Jun 2017 23:27:16 +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 72.A8.51736.3D2A0395; Thu, 1 Jun 2017 16:27:15 -0700 (PDT) Received: from milsmgip11.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; Thu, 1 Jun 2017 16:27:14 -0700 X-AuditID: 0ac94369-6dc8f9800000ca18-95-5930a2d315ed Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id BD.83.11415.2D2A0395; Thu, 1 Jun 2017 16:27:14 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , James Bottomley CC: , Christoph Hellwig , "Bart Van Assche" , Sreekanth Reddy Subject: [PATCH v2 03/12] Create two versions of scsi_internal_device_unblock() Date: Thu, 1 Jun 2017 16:27:02 -0700 Message-ID: <20170601232711.29062-4-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170601232711.29062-1-bart.vanassche@sandisk.com> References: <20170601232711.29062-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsXCddJ5ke7lRQaRBqvbVS1Wrj7KZLGxn8Oi +/oONovlx/8xWcz8+pTdgdVj1v2zbB7TJp1i89h9s4HN4+PTWywenzfJBbBGcdmkpOZklqUW 6dslcGUcfz2TtWC9RsXzDQ/YGxj3KnYxcnJICJhI9H5pYuli5OIQEljKJLFp9x1mCGcro8T0 qYcZYar+be5jg0hsZJTYuXcGE0iCTcBI4tv7mSwgtohAocSlbR2MIEXMAosYJU7uWApWJCzg L3Fq0n0gm4ODRUBF4v4hZZAwr4C9xJnem6wQC+Qlzm7ZyQxicwo4SOxrOQPWKgRU03R4Nthi CYFprBJ97y4wQzQLSpyc+QRsMbOAhMTBFy+YIRrUJU4umc80gVFoFpKyWUjKFjAyrWIUy83M Kc5NTy0wNNUrTsxLySzO1kvOz93ECAn3zB2Md594H2IU4GBU4uF9IGsQKcSaWFZcmXuIUYKD WUmEd918oBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXHeczJTI4QE0hNLUrNTUwtSi2CyTBycUg2M 12cfCysRu+LzQDj9+rpS4036iaYawe+esf29yc1RsWra9AP3dnrF/opZ1/np0b+8ndKXb54L ffrazuLwV/uL+55stBV7HW9geNl+u2mEGQPzm99PzP9IWT/ZIBJvNTGg3if6lHXk2itSBjOk QiUNJmtM+iDmXmcTm7PwJcNf1+AbdVoJfHWblFiKMxINtZiLihMBMdG3x3MCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrAJMWRmVeSWpSXmKPExsXCtZGTTffSIoNIg1Mn9CwO/mxjtFi5+iiT xcZ+Dovu6zvYLJYf/8dkMfPrU3YHNo9Z98+yeUybdIrNY/fNBjaPj09vsXhMW3OeyePzJrkA tigum5TUnMyy1CJ9uwSujOOvZ7IWrNeoeL7hAXsD417FLkZODgkBE4l/m/vYuhi5OIQE1jNK zG85zgySYBMwkvj2fiYLiC0iUChx//RpsCJmgUWMEg2/e9hAEsIC/hKnJt1nArFZBFQl1p1+ zwhi8wrYS0y5v4ARYoO8xNktO8GGcgo4SOxrOQNWLwRU03R4NtsERu4FjAyrGMVyM3OKc9Mz CwwN9YoT81Iyi7P1kvNzNzFCwiRyB+PTieaHGJk4OKUaGI+KXN/GbrFovk3Cn85HMvECj2Zr L5RS+BDTNPlZ4ttH6odOsgQ764p+Eb5z6V4q548rXVOz7FWeqOw63tzK+P5w94Xv7ssfHY+7 JLRkXf4N368B2a9+FSV17N0UbRHJGPbfzXDewV1d14RmXhV9uE5u1/IDO5Se/eZ+WdHOeD/5 veO08omuKklKLMUZiYZazEXFiQC7n3+GwwEAAA== 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)(39450400003)(39860400002)(39400400002)(39410400002)(39840400002)(39850400002)(2980300002)(438002)(189002)(199003)(9170700003)(72206003)(5660300001)(478600001)(54906002)(2906002)(5003940100001)(50226002)(53936002)(47776003)(38730400002)(48376002)(4326008)(8936002)(8676002)(81166006)(305945005)(77096006)(189998001)(36756003)(1076002)(50466002)(50986999)(6666003)(106466001)(2950100002)(33646002)(86362001)(356003)(76176999); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR04MB0386; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT031; 1:GrZ70wAr8tY7wMDLBhMrCVTAEBa+w4ZlkbeG8LF6xFcuKItyg/ExmPI9qkRp3pGXcdRHpsxZPlDyLYFvoJgtdwMS5dO5v6sY/rSC9Eyt4MbsS1d72EnBq7If9SUhcPH/JnznU61zgtuO0tmemiE7FqMPFgNEoOCzJzyG77AsIF/MmgshcoIktdaGA+NbbxrzWn+X3l5mpDl1iCPFhdZvQUB2HHS5maSxMCRva5xnzeKAOaFONS4jWdCugJ7kk7YxAGvY9OUIeWcAW5l/CxIRqVMzGK6VdgEWs5TBvEmjh1PrV52tGwGnOwPoVv1ZZZrRZf1LhW48m9W9lySizxTv1nnnn8/3Ijt0D1QZHjauHt4eY7itNszbf9JZcvMj7Xd6ZAhQxy/jF04l7oFvzuPDA89GyoFqy2pdAibMpTxeIh2NFVkjBZz3BxgF7HAx0H+QzlIrqqc/Xapz25P89eSLCc7GFu+QTwHk9CMAzUCTputIcabQk1rRB0QvDJxxyA4d5I+em2uZtbn4E+FkGREy7jZCbXU3opd2XYOxyJmmURI= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR04MB0386: X-MS-Office365-Filtering-Correlation-Id: 9f905906-3e67-491c-11a0-08d4a945bef3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BN6PR04MB0386; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0386; 3:zFVRJ+5CZL6+WBSiA6rATUrCqDkD06RpGwt+JPbo87SqbtbSRx1IBCCk8YuNcKDX6m+Ncdpc+qCZ1db909mUlBLricQdWSzLWOFgAvmocdhyq2wqVIIWldUmXznKR1lUvlwpXQXkKXc51EIXPKBCZ3x2eENoW+MbKyKa37krnawkfrP2oG0a7olayLzhGmanSoyLMQgYBU93CrfwYfJv6KQs0EWRgcgy3zMfU4W6/utXg9ZAtt8XXNpBSDjSj7do7vQZFJI7JovuBOJ6TJflhSR1hsCF+I4xUW1WVwp2CEu8J/qkGY6wM5jfrVh8qm2dHZDojYFfyYgxLx00CDQLdoCqBVIKFSvN7ApTg1280Y1kkqs55l8eBpidcIIbHVSqc+QKJg+JyrzNq48k8kPx5JMVveDT4tWaJR7ziDpKXdAIfdj9WtLhw1HavNMdqT6irc5W82qiDse/Zev207oND1NDbsM1I6ikpyp0hEEOg/6TqdHnUHZPnohn+Otr/rVy2hO+M4QVn19tjdMl6VUa1g== X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0386; 25:To+o5Aa4BLuoIPvGNasY5XIcP2gLr1Yzls4z4g5td5XiQEnf+/X8Fl9jT8qbY/+Lw6Y/QicD3jfXlO5L59dv7BliC6UxbjoM82zik4bnBAywPo3z2uqdbWpGlW+qZO4t0pmPilp+VZmQMJIAG+EdRjZHdYGCVotcyBfyR6vgEcpi286TQkS1cIEkSCe7eeLn3pALtlwSxoWSdPgQ4N6mPs6622UcWG7skCo8XNGEBoxZI8ZN9v3131OuuNTy/nEb5//xYR+xPKE8DjaakyFfAgv71h78lr0D46v/b08Ws2d+I5jMoBGpu35mPiGPLeeoUXr90EyWdiWYKJCHnnVQgLjAiGUFJXId6p4OHMPl+zktLEFhjdGBTBqFwLnbUnGWhtTQRZuth+FBNNAF20ihr45xdaaLMxSLMzSP5tsPIRnhDRjRpD3YMCEmgiapDBOzVpJqNJrhX2yQCKKvqutxZkJpPScXPdHhnpzr5mFth1o=; 31:qnlfRnjsFOAt/DI1jH1/Oihbyi46v2rbJcfxvLwd1+na52ncj+zQdTH5pmGbaFyt3r+ZrumxKNhvMlfvXe910osnqWorLWwl0KBkiRcTElG53MjHqwddK1d5asu4rAqkYR0kkCJjIDvKrRoFYT1gOWKQYplr4+/d5YOv/E2p5TY1CKBUPmAfIfX8TrgZU7Rrevmkc6IjdCHsH6qUqt0xfQwF06xHE8Ecb13O/IuFeyarHB8Zro1divG8QUsjafpXdrbiBjSmDA9e6DrkKMnitg== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0386; 20:Lt1JHWNXYWvbbxHkz2VoheLAsuM9hSsJwdMCAoYylmfQa/lEKPZDdpJ3/lljkNSHLMhdfaQKAX2b837u/puyJbpMuNa5lCT4l4BqnTg+oLOv55FKLIKSK7xZ4iJmSkT9tZWksSDUE5oZFUax77aGVIUXaj+AaR/tE9HSM0gZc6F4IbO/BPVVAENxYHeVQgDZLW2RYWPCcs7Zvsx32OLDvHJ5PLo2XueU1u2ltRcOvq4CEIuq7lzKDETEkGUUlEBuRwJilY0qSQfZsISASP1mNUDhht7EyXWxTtoCWVdkDLCH8i7FdlagVN0bPsxT7jJwdOr5aULKEM2IIfkqPnMLsTnxfdo8UY29KQPDlX1mdP6qUogOuFU1KhllAxWycuQZFtpA3KaQXCWlxkhYdTVJBtmd7cwCTSca6XDA00AGQBxIGT/aNj9mf7QFDmo9zsNSiEjC0GUTRcOU6t2pXB4jZAg/7Zl/oOyx2QP0GkO+47tRL+LBt/pu2jsRynizEyt/ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(13016025)(5005006)(13018025)(93006095)(93004095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123564025)(20161123558100)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR04MB0386; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR04MB0386; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR04MB0386; 4:6VzEZNHBl8+V2YYB4bhlrLr2LiTekOcD3L4v4SF6MV?= =?us-ascii?Q?HNTXPzf7Khnr0gBvaPtLjF1v17jXa3xZ0+gc3HqnPJGQ16LSNdXJ3+sUme/r?= =?us-ascii?Q?apjcPdFqy3QTKDuSw0YO+qOXldmmo/QKpL9jnTfMK06vyMwnV25s1Mqg4QSB?= =?us-ascii?Q?3VRsXHfFXZCV7AIGocOMEaqMnVi3rKgBq2RtMa+9rIMsm+kWguw47nku2jHE?= =?us-ascii?Q?X5KRmFWUXKYllOlkNQqBIa6jlPlWKTVcyIymiRJPKESj/8QaDfJZcMgIc6iy?= =?us-ascii?Q?dgxRL5LLZgDYAmQKqZBxQsX6BuQNAw1fXfOVo+mWlzh/HEgbXt5jsbmKzyZd?= =?us-ascii?Q?8xhFucXS8Ssx0hcmPoP2I+qaaQhFHwf2Qzgt6tINMbPMK3e98BoUp+RSFQ+J?= =?us-ascii?Q?yjphdazBcG0C18F8KS91vYDnwBbnGHEuPcZnq1tBhcUO0yKFcq1PUsLAuES8?= =?us-ascii?Q?goThRsMADyl467i745AsVHIhyAMS4R8hodOuuhZhcoP7rFF+p4uYAJIolUBu?= =?us-ascii?Q?3+OI4zsjgMNvIfN0HcChO5kj9omB5VVr+sC8PQoBz8CC7aNpfaogI+7773CM?= =?us-ascii?Q?LzN/Hmp1djfN4XZZsq23LhzSXmTRDayzXJeOuYOAxVhL67WjXaR4aumIUBcL?= =?us-ascii?Q?cN0HUKy+seLdD7FCzUTOdlfwU7jWwIOoXafzaXx1Wz0dO+i7YSmcr3F0trc4?= =?us-ascii?Q?P4RPgtKGQRfI2iN7yvQnRTojVcz+HdYy+3IoEoQH7Bx7AZ+isZ1MR2759LLe?= =?us-ascii?Q?YmC3GPmgizzLOOap5k9PCDQcCvk6RWcl2KYdfLDWUjPW8U1zk8/TW1o964vw?= =?us-ascii?Q?PgvtDKOYM+4KvIBEliQkJ2ojQObg2hF/TGrGcnd6OfQALLI1qjmpgoGfpZjS?= =?us-ascii?Q?tdXFvoMxTZYq+/W1lj5Ssjo9jssDDtepIS3P/FkuvaunTFSUX6sMI3dMrFFL?= =?us-ascii?Q?nO0TKBzXmeA5kAR4h/O3my5itnJyB/8wsmxyMD4qjGBhOt5PPu9NMbZIcvId?= =?us-ascii?Q?irsXygxawctW5emCEyairP/KjMD+jY4k7xm79ZzQOtIeDOHHaBjnyibD/szD?= =?us-ascii?Q?6hP3ZhnBhmy1DbY2usI1+SgNj2KzOjg4jhhGfjFNJHEeOjgKTTtrO+DMYOhp?= =?us-ascii?Q?unQHOjthHy63ff5hE2AreHR0CYecDK7I2WwTc2vSfTcW6M7YmnR4/IbSUXMi?= =?us-ascii?Q?jXOWyy6qc8bXBEBVz/PL+5vNAFxq3km1MNLBfo+cQHWb8HYUELNQ5Hk7ItZ8?= =?us-ascii?Q?t0mVV7bNEGUaYEu9M=3D?= X-Forefront-PRVS: 0325F6C77B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR04MB0386; 23:TpUiUjqWOc0Zp5b09yTnuAMoHuOllokorjt7yYltW?= =?us-ascii?Q?ukxJciFL3zxF4P4tS7T7foEGeanugN9vcOZQxc0bb38+d9pttFikfwdyjYeL?= =?us-ascii?Q?hy2DAln+SjXHtNC+6mWwi5VYEP+p2pCD1cQ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I0zIg2KG1kepIBzy5Qem/E4LyMYaeqDuGTvaQetlPDrlXWNg51Udt2C+W0L90eqyZE0VegEbOCuHh2eFSLAqsltsB+glY5VBdVFKdR4lArez8hz2aQxS+3JtBOfqvz/epdmCc5cd6mmvfiTYtfRVu56s; 24:mBETqijtyDsEdADqIHZyWK5DCERm1hkNF1DwjxS2ZfBAy1vD6Rq3VcT3uGyAHd0bDr+NFYpsUUElwW7O8MiiHvoowHjzA/Qc6Q3oK2otw9g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0386; 7:jFHLWUoJ9NxuEpQAsqVrSzVun9e8dqIPlwObEmmBNcWE5YujD7T4ipNztxBHSyKBcmW/OHSB8bjheqPnJ66yo/jQRPQmk2aLnUobcotLbYLWN+fUMrB+sfbgE/bx2uxtcG82k/fUFM4RIJ3iYm44g71Y4z/1GTDywfrCvnE80apNxX9MI+R9awsGCwzVPhMLSDG8qnJSTe8uOuFIYEFh2JjMByuNhRfQkqgTDM2jS6RQ3oCwaIdntU/f8tJesitBeGQmsJpHFbkMClUWJqpvWiZaCh21H/WUArn/8C5X+M1WvKkTBscjKjQndNAAscPeRAoD7o3f9BZSIeCqz53wTw==; 20:SBW1KBvwwzj4D+kbpDMRD3fX8u+akd3PEO9zVWGc6FYtETyR3Juy31Bvv1hxielfMywaEKJKgs+fbRUTWMI6MtZvJX6bXLWon36AcpPmFMHfdTCxXW4+M0Pj7PRUuplILiN8gqmphF1b4zHax/e+wR9kKhZwZSjLMTWqEMn+ZBI= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2017 23:27:16.8145 (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: BN6PR04MB0386 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 will make it easier to serialize SCSI device state changes through a mutex. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Cc: Christoph Hellwig Cc: Sreekanth Reddy Reviewed-by: Christoph Hellwig --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++-- drivers/scsi/scsi_lib.c | 46 +++++++++++++++++++++++++----------- include/scsi/scsi_device.h | 4 ++-- 3 files changed, 36 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index c63bc5ccce37..22998cbd538f 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -2883,7 +2883,7 @@ _scsih_internal_device_unblock(struct scsi_device *sdev, sdev_printk(KERN_WARNING, sdev, "device_unblock and setting to running, " "handle(0x%04x)\n", sas_device_priv_data->sas_target->handle); sas_device_priv_data->block = 0; - r = scsi_internal_device_unblock(sdev, SDEV_RUNNING); + r = scsi_internal_device_unblock_nowait(sdev, SDEV_RUNNING); if (r == -EINVAL) { /* The device has been set to SDEV_RUNNING by SD layer during * device addition but the request queue is still stopped by @@ -2902,7 +2902,7 @@ _scsih_internal_device_unblock(struct scsi_device *sdev, r, sas_device_priv_data->sas_target->handle); sas_device_priv_data->block = 0; - r = scsi_internal_device_unblock(sdev, SDEV_RUNNING); + r = scsi_internal_device_unblock_nowait(sdev, SDEV_RUNNING); if (r) sdev_printk(KERN_WARNING, sdev, "retried device_unblock" " failed with return(%d) for handle(0x%04x)\n", diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index c9ce36d16df0..aa84b77e41dc 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -3022,24 +3022,22 @@ static int scsi_internal_device_block(struct scsi_device *sdev) } /** - * scsi_internal_device_unblock - resume a device after a block request + * scsi_internal_device_unblock_nowait - resume a device after a block request * @sdev: device to resume - * @new_state: state to set devices to after unblocking + * @new_state: state to set the device to after unblocking * - * Called by scsi lld's or the midlayer to restart the device queue - * for the previously suspended scsi device. Called from interrupt or - * normal process context. + * Restart the device queue for a previously suspended SCSI device. Does not + * sleep. * - * Returns zero if successful or error if not. + * Returns zero if successful or a negative error code upon failure. * - * Notes: - * This routine transitions the device to the SDEV_RUNNING state - * or to one of the offline states (which must be a legal transition) - * allowing the midlayer to goose the queue for this device. + * Notes: + * This routine transitions the device to the SDEV_RUNNING state or to one of + * the offline states (which must be a legal transition) allowing the midlayer + * to goose the queue for this device. */ -int -scsi_internal_device_unblock(struct scsi_device *sdev, - enum scsi_device_state new_state) +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; @@ -3071,7 +3069,27 @@ scsi_internal_device_unblock(struct scsi_device *sdev, return 0; } -EXPORT_SYMBOL_GPL(scsi_internal_device_unblock); +EXPORT_SYMBOL_GPL(scsi_internal_device_unblock_nowait); + +/** + * scsi_internal_device_unblock - resume a device after a block request + * @sdev: device to resume + * @new_state: state to set the device to after unblocking + * + * Restart the device queue for a previously suspended SCSI device. May sleep. + * + * Returns zero if successful or a negative error code upon failure. + * + * Notes: + * This routine transitions the device to the SDEV_RUNNING state or to one of + * the offline states (which must be a legal transition) allowing the midlayer + * to goose the queue for this device. + */ +static int scsi_internal_device_unblock(struct scsi_device *sdev, + enum scsi_device_state new_state) +{ + return scsi_internal_device_unblock_nowait(sdev, new_state); +} static void device_block(struct scsi_device *sdev, void *data) diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 6ce6888f3c69..5f24dae2a8e1 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -473,8 +473,8 @@ static inline int scsi_device_created(struct scsi_device *sdev) } int scsi_internal_device_block_nowait(struct scsi_device *sdev); -int scsi_internal_device_unblock(struct scsi_device *sdev, - enum scsi_device_state new_state); +int scsi_internal_device_unblock_nowait(struct scsi_device *sdev, + enum scsi_device_state new_state); /* accessor functions for the SCSI parameters */ static inline int scsi_device_sync(struct scsi_device *sdev)