mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Huang Ying <ying.huang@intel.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	ming.m.lin@intel.com, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, Zheng Yan <zheng.z.yan@intel.com>
Subject: Re: [PATCH -v3 1/2] PCIe: Add runtime PM support to PCIe port
Date: Wed, 16 May 2012 11:01:52 +0800	[thread overview]
Message-ID: <1337137312.6493.3.camel@yhuang-dev> (raw)
In-Reply-To: <201205152053.44885.rjw@sisk.pl>

On Tue, 2012-05-15 at 20:53 +0200, Rafael J. Wysocki wrote:
> On Tuesday, May 15, 2012, Huang Ying wrote:
> > From: "Yan, Zheng" <zheng.z.yan@intel.com>
> > 
> > This patch adds runtime PM support to PCIe port.  This is needed by
> > PCIe D3cold support, where PCIe device without ACPI node may be
> > powered on/off by PCIe port.
> > 
> > Because runtime suspend is broken for some chipsets, a black list is
> > used to disable runtime PM support for these chipsets.
> > 
> > Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
> > ---
> >  drivers/pci/pci.c              |   10 ++++++++++
> >  drivers/pci/pcie/portdrv_pci.c |   30 ++++++++++++++++++++++++++++++
> >  2 files changed, 40 insertions(+)
> > 
> > --- a/drivers/pci/pci.c
> > +++ b/drivers/pci/pci.c
> > @@ -1517,6 +1517,16 @@ static void pci_pme_list_scan(struct wor
> >  	if (!list_empty(&pci_pme_list)) {
> >  		list_for_each_entry_safe(pme_dev, n, &pci_pme_list, list) {
> >  			if (pme_dev->dev->pme_poll) {
> > +				struct pci_dev *bridge;
> > +
> > +				bridge = pme_dev->dev->bus->self;
> > +				/*
> > +				 * If bridge is in low power state, the
> > +				 * configuration space of subordinate devices
> > +				 * may be not accessible
> > +				 */
> > +				if (bridge && bridge->current_state != PCI_D0)
> > +					continue;
> >  				pci_pme_wakeup(pme_dev->dev, NULL);
> >  			} else {
> >  				list_del(&pme_dev->list);
> > --- a/drivers/pci/pcie/portdrv_pci.c
> > +++ b/drivers/pci/pcie/portdrv_pci.c
> > @@ -11,6 +11,7 @@
> >  #include <linux/kernel.h>
> >  #include <linux/errno.h>
> >  #include <linux/pm.h>
> > +#include <linux/pm_runtime.h>
> >  #include <linux/init.h>
> >  #include <linux/pcieport_if.h>
> >  #include <linux/aer.h>
> > @@ -99,6 +100,21 @@ static int pcie_port_resume_noirq(struct
> >  	return 0;
> >  }
> >  
> > +#ifdef CONFIG_PM_RUNTIME
> > +static int pcie_port_runtime_suspend(struct device *dev)
> > +{
> > +	return 0;
> > +}
> > +
> > +static int pcie_port_runtime_resume(struct device *dev)
> > +{
> > +	return 0;
> > +}
> 
> Do we need those empty definitions?  If so, it might be just one
> function.

Yes.  The empty definition is necessary.  I will use just one function
here.

Best Regards,
Huang Ying



  reply	other threads:[~2012-05-16  3:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-15  7:00 [PATCH -v3 0/2] PCIe: Add PCIe runtime D3cold support Huang Ying
2012-05-15  7:00 ` [PATCH -v3 1/2] PCIe: Add runtime PM support to PCIe port Huang Ying
2012-05-15 18:53   ` Rafael J. Wysocki
2012-05-16  3:01     ` Huang Ying [this message]
2012-05-15  7:00 ` [PATCH -v3 2/2] PCIe: Add PCIe runtime D3cold support Huang Ying
2012-05-15 19:35   ` Rafael J. Wysocki
2012-05-17  7:27     ` Huang Ying
2012-05-17 19:21       ` Rafael J. Wysocki

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=1337137312.6493.3.camel@yhuang-dev \
    --to=ying.huang@intel.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --cc=rjw@sisk.pl \
    --cc=zheng.z.yan@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