Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp48722pxh; Thu, 7 Apr 2022 13:36:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJu10RTWUXqp0rJyZTm6F3UOLE/eGA2zYoDMPJTQMjNOclTv+1Qn72OPQdkGBTnEP7UbKa X-Received: by 2002:a17:902:b697:b0:151:4c2e:48be with SMTP id c23-20020a170902b69700b001514c2e48bemr15282366pls.70.1649363778650; Thu, 07 Apr 2022 13:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649363778; cv=none; d=google.com; s=arc-20160816; b=YTis0dhn8X0eRpzx+FVAWtt1KW+WqlK8ToucxvZcnR03s/q3aFQRudZvjyUa+rb/SN 20Svd1flRnYC61TrXibw3vD93LcyG+oGr43pTa/x45hT3lfBe03JXBGOvqZAjfEm8GTP +q0DWHFvzL6xy/1iO5p+Zpjiu9+6PhreDTy65hudsxNDdGNMF+onHlEEKuOASjanh/40 0J5hJPgtXDsYl1U32s+ICX3jXXJyxIubCdH4LnwHQoo8PSzyZ2vSUhkNgjSKsUUfsBrv 145UnwxXSgNbGWNYvhOKfklnjggdAitFYEBo4iyF3eY0lVAny1E9OvmR6+yMRQZGN6Ut KoQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=HzxVAqM0eNVJagcj+PdO6Cw7gcvo9v3/QO8Ada5aC10=; b=emV5F7vDhszbZpUSCgAnU6SGJGIYB6xi5pO7BqadvugzbX+ITwL0boff7onM8EjCOy vTrQBCI50Wi8+snZKjBGZUYToQVx+kd8WbzrU3dSdD7hBF//IvwJj8AOiHNnTUPfXHE7 g2vEPEtFFxQQ7FCQd1kEGeCBlt82yZIs1OHF9wzMjE/HSvv+PhEEH92WhOb0nQBBcR3p OwqOr3JCiLzzPhHPVoGcgcC4RrkLWdkvSaAu6r1wvEnD0FNiUnbtoctk4zzI7x7ySq9V PsZH/82Zm7d74I/xNJwPrp7ITBj0Wxj9jzY3lCX0EsKCPvZNhUGCIJVONv9OXqE+9L7v vCiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Oc2N78jC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g9-20020a636b09000000b0039ce0b69438si1494731pgc.370.2022.04.07.13.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:36:18 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Oc2N78jC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 39A153AF490; Thu, 7 Apr 2022 12:49:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345137AbiDGPvQ (ORCPT + 99 others); Thu, 7 Apr 2022 11:51:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345037AbiDGPvN (ORCPT ); Thu, 7 Apr 2022 11:51:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D0ACC55B4; Thu, 7 Apr 2022 08:49:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C18B3B827BE; Thu, 7 Apr 2022 15:49:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30075C385A4; Thu, 7 Apr 2022 15:49:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649346543; bh=e+alSzDzrc04Tz+Z+gKtvacXXhVH6XUBwWUSuj+9OLY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Oc2N78jCjftJ6PIjmp5gY2ESvtysUuqCXzStvWEfEv1QqIpD74eYG+szMe/ayl6VV 3inQ7HV6gKfAUY1Ws0V6gLvhykpmbviBaD0WVWtraPF0YJjlOY0eHNz8BtGINDzR9j VtjyrKIVb60+/UjKsW+J30OjL/NA63yXrs+ZuU6+Av+RrfuNPWhtxXZ1sj5sd48eME yp7TulI29pk7Lyhiq6ZjDV3Hsu//sFhYvGYR2puv91WWSEm4+52vFydk3XjtOeqvPG 1YL7c4tQ7sHKzEISGYghvuuA7QC72CcCpor3BQWik6dics9aVNLxgkuzHCDQnUYfMk Nd+ecSrbzJM7w== Date: Thu, 7 Apr 2022 10:49:01 -0500 From: Bjorn Helgaas To: "Rafael J. Wysocki" Cc: Linux PCI , LKML , Linux ACPI , Mika Westerberg , Linux PM Subject: Re: [PATCH v1] PCI: PM: Power up all devices during runtime resume Message-ID: <20220407154901.GA239301@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4412361.LvFx2qVVIh@kreacher> X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 06, 2022 at 09:00:52PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Currently, endpoint devices may not be powered up entirely during > runtime resume that follows a D3hot -> D0 transition of the parent > bridge. > > Namely, even if the power state of an endpoint device, as indicated > by its PCI_PM_CTRL register, is D0 after powering up its parent > bridge, it may be still necessary to bring its ACPI companion into > D0 and that should be done before accessing it. However, the current > code assumes that reading the PCI_PM_CTRL register is sufficient to > establish the endpoint device's power state, which may lead to > problems. > > Address that by forcing a power-up of all PCI devices, including the > platform firmware part of it, during runtime resume. > > Link: https://lore.kernel.org/linux-pm/11967527.O9o76ZdvQC@kreacher > Fixes: 5775b843a619 ("PCI: Restore config space on runtime resume despite being unbound") > Reported-by: Abhishek Sahu > Tested-by: Abhishek Sahu > Signed-off-by: Rafael J. Wysocki Applied with Mika's reviewed-by to pci/pm for v5.19, thanks! > --- > drivers/pci/pci-driver.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux-pm/drivers/pci/pci-driver.c > =================================================================== > --- linux-pm.orig/drivers/pci/pci-driver.c > +++ linux-pm/drivers/pci/pci-driver.c > @@ -1312,7 +1312,7 @@ static int pci_pm_runtime_resume(struct > * to a driver because although we left it in D0, it may have gone to > * D3cold when the bridge above it runtime suspended. > */ > - pci_restore_standard_config(pci_dev); > + pci_pm_default_resume_early(pci_dev); > > if (!pci_dev->driver) > return 0; > > >