From patchwork Tue Aug 7 22:51:33 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: 10559301 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6FFAE174A for ; Tue, 7 Aug 2018 22:51:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5ED362A6C3 for ; Tue, 7 Aug 2018 22:51:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 530392A6F7; Tue, 7 Aug 2018 22:51:38 +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 D97C52A731 for ; Tue, 7 Aug 2018 22:51:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbeHHBIN (ORCPT ); Tue, 7 Aug 2018 21:08:13 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:3349 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726625AbeHHBIN (ORCPT ); Tue, 7 Aug 2018 21:08:13 -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=1533682296; x=1565218296; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=uB4prMy4GnK15WnvycBHZzE4M/1JjWltr2vh5ooxzEo=; b=fwcVaB3KohVGIdZHEEh2eRCbw5YVYNFsRZMBqyQxqHXINLydC/fTh/jK lxXYL9RWpjcknKKORcx1rxtC96oJw+aq+AG03ooS60GUDYCMAMeEJo1C1 sy7uzpdJdyQvIjaDoB+phl/DMAa5hzNcfrc/9m5p8Bn33Hz1vDdhdWBVS /Brb99wls9RUKYbW8SH1qTZyqO5dyGKNwhQVg9yjhyonHtGUh6ftti8Ls NEOPjFgRZb2wUduKF0Ua6zeh7H9TqvG5tKvo4xGHEOXxJApEG19MQNul+ 3wIyrhbgKh3K/PZFbp3T2kOJZvWBh44ICFQZAKiwgD2bo9qoiS5BWOkyF A==; X-IronPort-AV: E=Sophos;i="5.51,456,1526313600"; d="scan'208";a="88480456" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 08 Aug 2018 06:51:36 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP; 07 Aug 2018 15:39:14 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 07 Aug 2018 15:51:36 -0700 From: Bart Van Assche To: Jens Axboe Cc: linux-block@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Ming Lei , Jianchao Wang , Hannes Reinecke , Johannes Thumshirn , Alan Stern Subject: [PATCH v5 9/9] blk-mq: Enable support for runtime power management Date: Tue, 7 Aug 2018 15:51:33 -0700 Message-Id: <20180807225133.27221-10-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180807225133.27221-1-bart.vanassche@wdc.com> References: <20180807225133.27221-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: Jianchao Wang Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Alan Stern --- block/blk-pm.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/block/blk-pm.c b/block/blk-pm.c index d6b65cef9764..eaaca1e26c88 100644 --- a/block/blk-pm.c +++ b/block/blk-pm.c @@ -27,12 +27,6 @@ */ void blk_pm_runtime_init(struct request_queue *q, struct device *dev) { - /* Don't enable runtime PM for blk-mq until it is ready */ - if (q->mq_ops) { - pm_runtime_disable(dev); - return; - } - q->dev = dev; q->rpm_status = RPM_ACTIVE; pm_runtime_set_autosuspend_delay(q->dev, -1);