From patchwork Tue Jul 17 23:49:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10531075 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 7DDF1600D0 for ; Tue, 17 Jul 2018 23:49:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D8AB2922E for ; Tue, 17 Jul 2018 23:49:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 625BC2923B; Tue, 17 Jul 2018 23:49:43 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 163E22922E for ; Tue, 17 Jul 2018 23:49:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730063AbeGRAYm (ORCPT ); Tue, 17 Jul 2018 20:24:42 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:18358 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731256AbeGRAYm (ORCPT ); Tue, 17 Jul 2018 20:24:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1531871382; x=1563407382; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Mfuxwq7B9r9Cd4EqWaPryb4kRz+wdMdiqmw+T9bon9A=; b=LWcBLZNBOE5dS8XyWza8DvhkohliHgHk2wYVQRfLc5ibfBV7RY/PXS3E p0ETEiguaVYuiLQAdgX2V/HGWMYX/JG10fVydNpD5qFjPG1vse3WXttx/ iqVkIVzXwSZkzhGcrsQGtQSBTZF46F5LyQyaFVpcQBWJxnmnloJk7915/ WvsebheU2dHMAU17l38OSpqnl7VcZfuqZVNwKQk0lRm7sgs5GNM25P4fZ wjghBQREu9N0l+n7cKuRPrlf1PUOAy0U168W951+T0CjNTmB85rdNB41i M9nupHWtZylCnD6azDdkF1wzjpUahEceaXgFkyVrcC6jpDPklbCVaL3ys A==; X-IronPort-AV: E=Sophos;i="5.51,367,1526313600"; d="scan'208";a="87482931" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Jul 2018 07:49:41 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 17 Jul 2018 16:38:31 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 17 Jul 2018 16:49:42 -0700 From: Bart Van Assche To: Jens Axboe Cc: linux-block@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Ming Lei , Alan Stern , Johannes Thumshirn Subject: [PATCH 3/3] blk-mq: Enable support for runtime power management Date: Tue, 17 Jul 2018 16:49:40 -0700 Message-Id: <20180717234940.11231-4-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180717234940.11231-1-bart.vanassche@wdc.com> References: <20180717234940.11231-1-bart.vanassche@wdc.com> 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 Now that the blk-mq core processes power management requests (marked with RQF_PREEMPT) in other states than RPM_ACTIVE, enable runtime power management for blk-mq. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Ming Lei Cc: Alan Stern Cc: Johannes Thumshirn --- block/blk-core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 65d7f27c8c22..5aade9fa96be 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -3739,10 +3739,6 @@ EXPORT_SYMBOL(blk_finish_plug); */ void blk_pm_runtime_init(struct request_queue *q, struct device *dev) { - /* not support for RQF_PM and ->rpm_status in blk-mq yet */ - if (q->mq_ops) - return; - q->dev = dev; q->rpm_status = RPM_ACTIVE; pm_runtime_set_autosuspend_delay(q->dev, -1);