mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Huang Ying <ying.huang@intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: Re: [BUGFIX 1/4] PCI/PM: enable D3/D3cold by default for most devices
Date: Sat, 4 Aug 2012 23:46:47 +0200	[thread overview]
Message-ID: <201208042346.47702.rjw@sisk.pl> (raw)
In-Reply-To: <1343975435-25469-2-git-send-email-ying.huang@intel.com>

On Friday, August 03, 2012, Huang Ying wrote:
> This patch fixes the following bug:
> 
> http://marc.info/?l=linux-usb&m=134318961120825&w=2
> 
> Originally, device lower power states include D1, D2, D3.  After that,
> D3 is further divided into D3hot and D3cold.  To support both scenario
> safely, original D3 is mapped to D3cold.
> 
> When adding D3cold support, because worry about some device may have
> broken D3cold support, D3cold is disabled by default.  This disable D3
> on original platform too.  But some original platform may only have
> working D3, but no working D1, D2.  The root cause of the above bug is
> it too.
> 
> To deal with this, this patch enables D3/D3cold by default for most
> devices.  This restores the original behavior.  For some devices that
> suspected to have broken D3cold support, such as PCIe port, D3cold is
> disabled by default.
> 
> Reported-by: Bjorn Mork <bjorn@mork.no>
> Signed-off-by: Huang Ying <ying.huang@intel.com>

Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl>

> ---
>  drivers/pci/pci.c              |    1 +
>  drivers/pci/pcie/portdrv_pci.c |    5 +++++
>  2 files changed, 6 insertions(+)
> 
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -1941,6 +1941,7 @@ void pci_pm_init(struct pci_dev *dev)
>  	dev->pm_cap = pm;
>  	dev->d3_delay = PCI_PM_D3_WAIT;
>  	dev->d3cold_delay = PCI_PM_D3COLD_WAIT;
> +	dev->d3cold_allowed = true;
>  
>  	dev->d1_support = false;
>  	dev->d2_support = false;
> --- a/drivers/pci/pcie/portdrv_pci.c
> +++ b/drivers/pci/pcie/portdrv_pci.c
> @@ -200,6 +200,11 @@ static int __devinit pcie_portdrv_probe(
>  		return status;
>  
>  	pci_save_state(dev);
> +	/*
> +	 * D3cold may not work properly on some PCIe port, so disable
> +	 * it by default.
> +	 */
> +	dev->d3cold_allowed = false;
>  	if (!pci_match_id(port_runtime_pm_black_list, dev))
>  		pm_runtime_put_noidle(&dev->dev);
>  
> 
> 


  reply	other threads:[~2012-08-04 21:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03  6:30 [PATCH 0/4] PCI/PM: PCI D3cold support fixes for 3.6-rc1 Huang Ying
2012-08-03  6:30 ` [BUGFIX 1/4] PCI/PM: enable D3/D3cold by default for most devices Huang Ying
2012-08-04 21:46   ` Rafael J. Wysocki [this message]
2012-08-03  6:30 ` [BUGFIX 2/4] PCI/PM: Keep parent bridge active when probing device Huang Ying
2012-08-04 21:48   ` Rafael J. Wysocki
2012-08-03  6:30 ` [BUGFIX 3/4] PCI/PM: Fix config reg access for D3cold and bridge suspending Huang Ying
2012-08-03 14:46   ` Alan Stern
2012-08-04 21:37     ` Rafael J. Wysocki
2012-08-04 21:44       ` Rafael J. Wysocki
2012-08-03  6:30 ` [PATCH 4/4] PCI/PM: Add ABI document for sysfs file d3cold_allowed Huang Ying
2012-08-19 10:35 ` [PATCH 0/4] PCI/PM: PCI D3cold support fixes for 3.6-rc1 Bjørn Mork
2012-08-20  1:09   ` huang ying
2012-08-21 23:47     ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201208042346.47702.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome