lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 May 2012 11:01:52 +0800
From:	Huang Ying <ying.huang@...el.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Bjorn Helgaas <bhelgaas@...gle.com>, ming.m.lin@...el.com,
	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
	Zheng Yan <zheng.z.yan@...el.com>
Subject: Re: [PATCH -v3 1/2] PCIe: Add runtime PM support to PCIe port

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@...el.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@...el.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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ