From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032237AbdIZVfv (ORCPT ); Tue, 26 Sep 2017 17:35:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:60876 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032221AbdIZVfu (ORCPT ); Tue, 26 Sep 2017 17:35:50 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30AD220C51 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Tue, 26 Sep 2017 16:35:47 -0500 From: Bjorn Helgaas To: "Rafael J. Wysocki" Cc: Linux PCI , Bjorn Helgaas , Alan Stern , Linux PM , Mika Westerberg , LKML Subject: Re: [PATCH] PM / PCI: Do not resume any devices in pci_pm_prepare() Message-ID: <20170926213547.GV15970@bhelgaas-glaptop.roam.corp.google.com> References: <1877076.QiUpNxchJO@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1877076.QiUpNxchJO@aspire.rjw.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 25, 2017 at 01:33:13AM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > It should not be necessary to resume devices with ignore_children set > in pci_pm_prepare(), because they should be resumed explcitly by > their children drivers during suspend if need be and they will be > resumed by pci_pm_suspend() after that anyway, so avoid doing that. > > Signed-off-by: Rafael J. Wysocki Oh, and I meant to also say that you've merged the PM-related things here in the past, so I assume you'll take this one :) > --- > drivers/pci/pci-driver.c | 7 ------- > 1 file changed, 7 deletions(-) > > Index: linux-pm/drivers/pci/pci-driver.c > =================================================================== > --- linux-pm.orig/drivers/pci/pci-driver.c > +++ linux-pm/drivers/pci/pci-driver.c > @@ -680,13 +680,6 @@ static int pci_pm_prepare(struct device > { > struct device_driver *drv = dev->driver; > > - /* > - * Devices having power.ignore_children set may still be necessary for > - * suspending their children in the next phase of device suspend. > - */ > - if (dev->power.ignore_children) > - pm_runtime_resume(dev); > - > if (drv && drv->pm && drv->pm->prepare) { > int error = drv->pm->prepare(dev); > if (error) >