From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62BBCC31E45 for ; Thu, 13 Jun 2019 15:20:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5809D20B7C for ; Thu, 13 Jun 2019 15:20:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732285AbfFMPUB (ORCPT ); Thu, 13 Jun 2019 11:20:01 -0400 Received: from mga07.intel.com ([134.134.136.100]:13916 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732117AbfFMM5X (ORCPT ); Thu, 13 Jun 2019 08:57:23 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2019 05:57:22 -0700 X-ExtLoop1: 1 Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga001.fm.intel.com with SMTP; 13 Jun 2019 05:57:19 -0700 Received: by lahna (sSMTP sendmail emulation); Thu, 13 Jun 2019 15:57:18 +0300 Date: Thu, 13 Jun 2019 15:57:18 +0300 From: Mika Westerberg To: "Rafael J. Wysocki" Cc: Linux PCI , Linux PM , Linux ACPI , LKML , Bjorn Helgaas , Keith Busch , Kai-Heng Feng Subject: Re: [PATCH] PCI: PM: Skip devices in D0 for suspend-to-idle Message-ID: <20190613125718.GM2640@lahna.fi.intel.com> References: <2513600.jR9RdVMSR0@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2513600.jR9RdVMSR0@kreacher> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Thu, Jun 13, 2019 at 12:14:02AM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Commit d491f2b75237 ("PCI: PM: Avoid possible suspend-to-idle issue") > attempted to avoid a problem with devices whose drivers want them to > stay in D0 over suspend-to-idle and resume, but it did not go as far > as it should with that. > > Namely, first of all, it is questionable to change the power state > of a PCI bridge with a device in D0 under it, but that is not > actively prevented from happening during system-wide PM transitions, > so use the skip_bus_pm flag introduced by commit d491f2b75237 for > that. > > Second, the configuration of devices left in D0 (whatever the reason) > during suspend-to-idle need not be changed and attempting to put them > into D0 again by force may confuse some firmware, so explicitly avoid > doing that. > > Fixes: d491f2b75237 ("PCI: PM: Avoid possible suspend-to-idle issue") > Reported-by: Kai-Heng Feng > Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg