From patchwork Wed May 24 00:34:00 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: 9744691 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 4AB9D602A7 for ; Wed, 24 May 2017 00:34:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D4C228867 for ; Wed, 24 May 2017 00:34:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 322802886B; Wed, 24 May 2017 00:34:47 +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 51E0828867 for ; Wed, 24 May 2017 00:34:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751421AbdEXAep (ORCPT ); Tue, 23 May 2017 20:34:45 -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 S1760497AbdEXAea (ORCPT ); Tue, 23 May 2017 20:34:30 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208,223";a="21089168" Received: from mail-by2nam03lp0052.outbound.protection.outlook.com (HELO NAM03-BY2-obe.outbound.protection.outlook.com) ([216.32.180.52]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 08:34:29 +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=xw1kmPaMlpIRiRUxsgcXvCTeqazGLik1vcDcEhumufc=; b=FQeRiu3+HMC6lOfv3HaD0y7WOvfWEnjgpGAvHcsZ46sOMAVuF7B9bvFGUiVI5UTT0A0QgZfWB6a4kTQswxdXqFuqTPi40Pe8VJOYnkdDp1IKhPJGhIiFgb8r8q4ksFYJ7ig/nTOXzYvbAyTghrVCbjMlCRKgdusH4pG0Wq4ZQlc= Received: from CY4PR04CA0034.namprd04.prod.outlook.com (10.172.133.20) by BN6PR04MB0357.namprd04.prod.outlook.com (10.173.198.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Wed, 24 May 2017 00:34:27 +0000 Received: from CO1NAM04FT048.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::205) by CY4PR04CA0034.outlook.office365.com (2603:10b6:903:c6::20) 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:27 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; suse.com; dkim=none (message not signed) header.d=none;suse.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 CO1NAM04FT048.mail.protection.outlook.com (10.152.91.166) 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:26 +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 98.43.45291.115D4295; Tue, 23 May 2017 17:34:26 -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:23 -0700 X-AuditID: 0ac94369-166ac9800001b0eb-fa-5924d511324b Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 52.A3.18148.F05D4295; Tue, 23 May 2017 17:34:23 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , James Bottomley CC: , , "Bart Van Assche" , Jens Axboe , "Christoph Hellwig" , Omar Sandoval , Hannes Reinecke Subject: [PATCH 11/31] block: Introduce queue flag QUEUE_FLAG_SCSI_SUP Date: Tue, 23 May 2017 17:34:00 -0700 Message-ID: <20170524003420.5381-12-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+NgFvrILMWRmVeSWpSXmKPExsXCddJ5ka7QVZVIg1c/uC3+7znGZrHgzV42 i5WrjzJZbOznsNh7S9ui+/oONovlx/8xWRy+d5XFgcNjYvM7do9pk06xeey+2cDm8fHpLRaP 9Vuusnh83iQXwBbFZZOSmpNZllqkb5fAlXHw93bWghbFig0PfBoYX0t3MXJySAiYSBzZcoy5 i5GLQ0hgKZPEiZVz2SCcHYwS7ztnsMNU/d26kAUisZFR4u7fFhaQBJuAkcS39zPBbBGBQolL 2zoYQYqYBd4zSlx7/wyom4NDWMBN4suKcpAaFgFViZYni1hBbF4Be4nP13dALZCXOLtlJzOI zQkU73o1AaxVSMBOYtH2CpCREgKrWCX2buhhgugV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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)(39850400002)(39400400002)(39410400002)(39860400002)(39840400002)(2980300002)(438002)(51234002)(199003)(189002)(9170700003)(478600001)(5003940100001)(189998001)(38730400002)(48376002)(50466002)(8676002)(50986999)(47776003)(81166006)(2906002)(76176999)(77096006)(50226002)(36756003)(33646002)(5660300001)(8936002)(305945005)(53936002)(1076002)(106466001)(6666003)(54906002)(356003)(2950100002)(72206003)(86362001)(4326008); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR04MB0357; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT048; 1:IIheWMeP+HsZIFkVLJh47qHq2FAKdxNVFCLgYWg19RWzXE2ZE3QyqhuHH/+GgKeukWBzBtLQmHXFmLHewJ5MssAJrrzWXr38/aEXOCBVqKm5svpD9IKZA8yUEnQMFN2MOc827PCKmHVy7Wkhgr5b4aqxW50Bf6Wy+8e+mw4UdllNXulyKm46jQkBEUZ4zxTQNxmMHo3g6ryM59gmSGs7qU1G5up2C3Oo00nJ8y3AiyBRKGkat6p61jw70K4cCmtTq9KaUfKNHKV2oTYUw05YVAnuZsOoaX/hXnOfzjyNyR4WyqNG02UD5/0EbX6YU8Xu0GmYu9rwp8AnEuvAoK7s0C0xlfAFyC/AO/Z9zcYn7OdZRvJ5YOjKnJQU18DLdzjCOs9yfRJmNc5IqLj5zdZbMAL2MhX0AXKoIMaACuNVnrqECbbTwjP8Iq5mxMG/gcwWqHHUnt0FglPgvPn0q+RvOpIGdvJxyr3FVi70buz38PK1aZ93vEM8DbVgpN8hQI/FXBdJUxn3nzw/r3j1MOmXSPhY5nzzVc99ssEiy2UY9Jw= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR04MB0357: X-MS-Office365-Filtering-Correlation-Id: 1b6e4b0a-5db3-4454-a5e9-08d4a23ca249 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BN6PR04MB0357; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0357; 3:TV2atZl4L2wmKhIv0E+RRWvdCXUbI1Fw+7qFHXNSg0xX8cjvEu3wBZKkuEe2W61rsXg1uucCnVvbu9RSIOPYcPF7e1EuNUOCwV2OXqs+Y01oVMj/dCArt9xK6WGBSzdnVPtO9m8Mb6snoTJcAoXUCC3PGIlGn1N0hx5R60uBjYIn4bDr1rp0foIMTvmb2jRUUMLmCRcFqzbefvgc99sIIvhLBOMISei/cMeC4XzsrLaCqyD34RifunYxLwftgu4gsLX3UeBMfQ+zAPc6z3sl8cU12Rt9GFixyOlt6EvD5y3CaXBMBMRKjwpevxdlOT5+PVcFtL5O8a5zHQaJnmGYhVsRt6fyDit96D2Ol8leNpa/0HGwyHbW4ZoRUU162/1UPdMyymrP9Y61EWzhZ4xNqPIt72JEJ2FqT+RFjmrdOyioMswajrpsWf4j73KEvK7uksB0b+hVtGzGLdbr39BhE8UyPBSvhj/IkuxfpJK2+RUVg4dUDKHn9QpF7aDHw1oR X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0357; 25:EAtElxfvJJ4jKfzRxgmZHRiptruPvC2WjUybmzclu1PCIxkt3zM3w/at+aGfYD5kJy4BPKU+vmFJWgZlo7xJtZ5eNVANDuhflhj6Wy8+lX64w42rlHP6fl8knG6keyb0CXfQY10btXSUJYvcw/XSWQPnzKZx0zMbSYND2p2+eZrxTvMYFD+E351xL84FKCEi1mZEDyn1sTXQw9SkNNlYbnEMC/wib5Z3TfidW4Mluw33MmchpdmgCvHzcinq0FG3ORWz/e7LXp00xdmhS3IH/Lpe0h+55elUvACLeZuEms+Zyvc6d8LohZusXSo0vkyi2zOco4t2eNX7wXt+/cTTCWB06vHSeP59XWBWRWxGeZsT4P69EM+/MUYh66cjPi3gfkyZbLGZyhvf7NHC3VoiskCnI1lzjjNaAythLxzw/7BTFsoqpxo7zZeuLULRWTMHunU12TgiEiE8Pf+5yegWGW0ubtoqyUZkGqv/8ykZ4kE=; 31:UvxOGhYAggp91R/xF3vq/d7jOGL25AGgKSCGNvJUr5ZEPVGTXs2nd3pPSzOJuJb+a9q/IIVXOUm1z26YSRitzUt69Om5idQgK5iO8eiaxuWliIzjtytiubaCuCo68JfWOJFLAEIqxI1bZctbouWyiGduURwEaKs8bR4j1PfCKY52vW/fmyu25AGxcVZRdtS3tbhkrxD15V8dm6AQwumHO1IvlaT4yxkqcPrmfI96vS4r4ZXqHKRaAHbPzSAQ9a+2vqkvkDzSo/QtvxmXrEXOgw== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0357; 20:d1x7G0S2od45bEp7iNTw0vqTOjTjAOuvFL+oRIVRCMEz11qh3qLlczaUefR+cr5hAvbBU4AMiZj6khWyJhdAMkfeF7lN90Lh5ACxKZ5AJf6eAnRmRjGL+fYeOCjH3idhfzlWzE5kCvUPZ1Xcbq50HMa8+JzD2W+aFUfMV1Ggq7N3etNiSw4X00Jkk2AVzihucycmoYdWWszk8bVjOfqCGhP5rOecj139hv4JwaQ+vfiJNS4jBNB7T7tLzJPXbAWea6nyMhAquxHvA3xeykRRJ+C8cKZ1Vxld8FG+jOCSf4SIKsTrX5XLxfKVC0TRqlgfYuJbUULDpobCC+L7kBJX9xzGkbboggBDx5ZpsyAVcmOat1Y0VMJJ34mwRjaKMB3fY2YtiM46TN0TAZyz7/oX7qoESUkglkdGIg7OHLP5vV7r8fCQ0bYbPTjmK0fv3JG3Q2Og56YF1Y/OaeR+M2lGOha853nFR84pC6dUfnN1QaNoO/Ke+oj/hfWZzbkp+LdE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700052)(100105000095)(100000701052)(100105300095)(100000702052)(100105100095)(6040450)(601004)(2401047)(13016025)(5005006)(8121501046)(13018025)(100000703052)(100105400095)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(20161123562025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(6072148)(100000704052)(100105200095)(100000705052)(100105500095); SRVR:BN6PR04MB0357; BCL:0; PCL:0; RULEID:(100000800052)(100110000095)(100000801052)(100110300095)(100000802052)(100110100095)(100000803052)(100110400095)(100000804052)(100110200095)(100000805043)(100110500095); SRVR:BN6PR04MB0357; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR04MB0357; 4:5JC0AL+0weeNkSDo+pb2wgAoXxdN9MY1inBQJWgNvH?= =?us-ascii?Q?Cv5CzgBlxc+5oLuVKNB0icer4FTVu+4V5TVrli9HaCj+mZEz1gAeFD6+22/s?= =?us-ascii?Q?sx5ymHvhOpfa4s7c0hBsYRcSo7q5zAuQH0EUWl6X7XG7/K1bSw9ftcejowZl?= =?us-ascii?Q?dNFZXMEqsg7wR0Da5SZjym6t84/8g8qLjl30Id2exkd3KCXrYYgj+qLRfauG?= =?us-ascii?Q?MlE7I0bYUgIkOZNXAmiosPKFQWk5hQQv/S3jQs2UMBkBCuR7dGnSGNdnl0h6?= =?us-ascii?Q?SsxPRYvaGtD8bFccgZ3s7By04oG+Fc5TTmrcGoWBq8QOBt2DL3w9fHLL5cqj?= =?us-ascii?Q?M9kwuVXSLWKX6TCdXqs62q8A9Av+9jBnGyXfXuYuYF4K/e10JdHyILmxKcAt?= =?us-ascii?Q?zyoQXzqGyolADWqkLL4mPSkFkTrSfrxIzvk/PLFsxbMDtTjWLhVBWCuNbsZJ?= =?us-ascii?Q?8JT1USotypRG+ScWUPcqjucFbnE8RfnXSJnr4jyPqkdGUe/1NjAEKFzESeVY?= =?us-ascii?Q?o0EOpoNUM5TbwWpEUL187aH97+22KjrUlI+gkawUz8MXIM1ixsMBNGTWmSG3?= =?us-ascii?Q?nFZmp2RpPlNnHQvkRN41VwSV0+Bfc/E09G4h36BAq2SugWstvoKw1KDuJn/U?= =?us-ascii?Q?qSA5zb//sLp9kuP7y3+fQSittfEutLPDcrWNrbw9CuROXb8e6sBuexQSLIhs?= =?us-ascii?Q?yHGL1rCMf2EoCGVGqJcW75Hg4a3pUjpGtbTficEepQDNW8jtOwCSTZEc+wyq?= =?us-ascii?Q?rSJf5mGi72jcR2vranp3q3l/NJw4ug0TZDorEh7adnvca3tHFVtNXoCcm8V4?= =?us-ascii?Q?cXo9KNn50Zf30UunDAARy/T/eiXch7XVojrqsPomZhS4WIn7z30hlc+7P+fR?= =?us-ascii?Q?5KRcvLtQe0qUZcOkmMoL3YdQ8XnUd6mSlin6kuzWtNPHCZIC++SsvZsZdID8?= =?us-ascii?Q?ByV9Q2LhMso0sdncF8PZhGIjKt6CFyp5CS3jVoVM6rF57HO0Wdz8ruo8JHlT?= =?us-ascii?Q?3SzNYi/zopSaLRLcVXzxseyEoiS/hQNNdyaRv7xTp7XDXtRGMer1sgVw40eJ?= =?us-ascii?Q?+azfDr08YZF72EjPks20RTB0dyjAc1t+few896z/oUTqSLnaC1WJLbQZga9T?= =?us-ascii?Q?rUCuEYy9Y3A1PwRhmBCXVIuSDl65TlMRbu1dhlMCVL5hLa6RzXXRtp1eiVqV?= =?us-ascii?Q?Eg3YXTdYnTX0croWGyYrK95q1LH10h4lhz0hFy5hlZUykdHy/RXAJVodMgG6?= =?us-ascii?Q?w5u+vGp8MZ7HDudL6o8RhdwWgm2xVipzGUY+hCuejehm52y/ITP7aiOLUFBQ?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 031763BCAF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR04MB0357; 23:EEKfshG7bZGHtUgxaF1ytTQp58WYSSncxFT3x0bXa?= =?us-ascii?Q?x0HDB20RZ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xuJ5Z4Dwx4KHaxAa5T/2/dePCf8k5L63uly+VWnDoAHDi+Sxg+fXAp3JY4/XBo3ajNn8i/ZgUgfOL6ny7Q6sXDUjU+Rng02mJWlpO1xmOUb8sbC7uc5WbJ/6SKJbkxD6Iqbq1t2RwiVIO9Voo91llct9OhmTDHP1ZiHYqLVZvejPYX4bQmzlkYYIfmTbrfZX3Ku4nfkhRBPpnqb8IprkHKEDFdn4sEC2EhONNWGV/DTpcRlGd0T5j+3Ew9RjCXVgaUAZ774CRyQpfO9+iNkQ01IESkEL; 24:3RmRnj/rH7g6xKFrN+QX6RnOj89+IRjBaDY//j5NQpyWNkEHA5AFRnoeNP0HRtgvCgv9pePMgRO5F19uyuuv0s6FhwbNzt8Z5iDeX7AnEK4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0357; 7:WzKxpzyon8NdPnL0fUvmbG3+0CelXviWFTPRiQqEi+wgwC+BzIiOVpqvnyFRRy46JBWOL6XqSZkbbSDNUGreYXT3E5Jw66wTl8QOi0KI8anSB1tV2x23JzJQE/iJd8gxvhaXzdhdNBkZlaOiFHp5FjdE3431HANWiHF7ZhRWDQT7rOzd/A16RKUFSyUthFhWT8xpG6BBYprQm7gKbwpcUxYkoz3Xk+oWITUZubsopQ7jtFaM6FLDYADUq5FIGQVzqTt2SzfdFDaN6ZykdlYdpqpjfT3EqW/89qnwfe+uY2c2V1ZMk2HFX6crrL80qdeE6ZtQg5518FBOW2fHx8EHRg==; 20:Ql0jpc3MNERUWdFz5tUihKl6eWbdiEzx1H8pxXTE+wYldytdyWiBdb+oH9OyfZnNed1uoE+iOv78scHJT7nn//OJx50QZd3mxP/w5ND4L85Qcbb142xHdk+U78klVSx7dybKAqDuOdap6VBF4AA4uIaLNARxOxCwhYuzeLrCVNI= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2017 00:34:26.5705 (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: BN6PR04MB0357 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From the context where a SCSI command is submitted it is not always possible to figure out whether or not the queue the command is submitted to has struct scsi_request as the first member of its private data. Hence introduce the flag QUEUE_FLAG_SCSI_SUP. Signed-off-by: Bart Van Assche Cc: Jens Axboe Cc: Christoph Hellwig Cc: Omar Sandoval Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke --- block/bsg-lib.c | 1 + drivers/block/cciss.c | 1 + drivers/ide/ide-probe.c | 1 + drivers/scsi/scsi_lib.c | 2 ++ drivers/scsi/scsi_transport_sas.c | 1 + include/linux/blkdev.h | 2 ++ 6 files changed, 8 insertions(+) diff --git a/block/bsg-lib.c b/block/bsg-lib.c index 0a23dbba2d30..420ac014b49c 100644 --- a/block/bsg-lib.c +++ b/block/bsg-lib.c @@ -246,6 +246,7 @@ struct request_queue *bsg_setup_queue(struct device *dev, char *name, q->bsg_job_size = dd_job_size; q->bsg_job_fn = job_fn; queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q); + queue_flag_set_unlocked(QUEUE_FLAG_SCSI_SUP, q); blk_queue_softirq_done(q, bsg_softirq_done); blk_queue_rq_timeout(q, BLK_DEFAULT_SG_TIMEOUT); diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index cd375503f7b0..9706718749e5 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1956,6 +1956,7 @@ static int cciss_add_disk(ctlr_info_t *h, struct gendisk *disk, disk->queue->cmd_size = sizeof(struct scsi_request); disk->queue->request_fn = do_cciss_request; disk->queue->queue_lock = &h->lock; + queue_flag_set_unlocked(QUEUE_FLAG_SCSI_SUP, disk->queue); if (blk_init_allocated_queue(disk->queue) < 0) goto cleanup_queue; diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 023562565d11..fdfa11f80dda 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -773,6 +773,7 @@ static int ide_init_queue(ide_drive_t *drive) q->request_fn = do_ide_request; q->init_rq_fn = ide_init_rq; q->cmd_size = sizeof(struct ide_request); + queue_flag_set_unlocked(QUEUE_FLAG_SCSI_SUP, q); if (blk_init_allocated_queue(q) < 0) { blk_cleanup_queue(q); return 1; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 59400033aba8..4cecf82960b7 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2059,6 +2059,8 @@ void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q) { struct device *dev = shost->dma_dev; + queue_flag_set_unlocked(QUEUE_FLAG_SCSI_SUP, q); + /* * this limit is imposed by hardware restrictions */ diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 0ebe2f1bb908..e5eab2685ecf 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -264,6 +264,7 @@ static int sas_bsg_initialize(struct Scsi_Host *shost, struct sas_rphy *rphy) q->queuedata = shost; queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q); + queue_flag_set_unlocked(QUEUE_FLAG_SCSI_SUP, q); return 0; out_cleanup_queue: diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index b5d1e27631ee..6416a5834b05 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -618,6 +618,7 @@ struct request_queue { #define QUEUE_FLAG_STATS 27 /* track rq completion times */ #define QUEUE_FLAG_POLL_STATS 28 /* collecting stats for hybrid polling */ #define QUEUE_FLAG_REGISTERED 29 /* queue has been registered to a disk */ +#define QUEUE_FLAG_SCSI_SUP 30 /* queue supports SCSI commands */ #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ (1 << QUEUE_FLAG_STACKABLE) | \ @@ -708,6 +709,7 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) #define blk_queue_secure_erase(q) \ (test_bit(QUEUE_FLAG_SECERASE, &(q)->queue_flags)) #define blk_queue_dax(q) test_bit(QUEUE_FLAG_DAX, &(q)->queue_flags) +#define blk_queue_scsi_sup(q) test_bit(QUEUE_FLAG_SCSI_SUP, &(q)->queue_flags) #define blk_noretry_request(rq) \ ((rq)->cmd_flags & (REQ_FAILFAST_DEV|REQ_FAILFAST_TRANSPORT| \