From: Shaohua Li Date: Wed, 24 Oct 2007 02:43:23 +0000 (+0800) Subject: pcie port driver: correctly detect native PME feature X-Git-Tag: v2.6.25-rc1~1074^2~60 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39ec4561b3a9ccccbdab1dd88a045342be22f27b;p=linux-2.6 pcie port driver: correctly detect native PME feature Native PME is capability of root port or root complex event collector. It's not determined by PCI PME capability. Signed-off-by: Shaohua Li Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index b20a9b81da..23d9eb0732 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c @@ -192,9 +192,8 @@ static int get_port_device_capability(struct pci_dev *dev) if (reg32 & SLOT_HP_CAPABLE_MASK) services |= PCIE_PORT_SERVICE_HP; } - /* PME Capable */ - pos = pci_find_capability(dev, PCI_CAP_ID_PME); - if (pos) + /* PME Capable - root port capability */ + if (((reg16 >> 4) & PORT_TYPE_MASK) == PCIE_RC_PORT) services |= PCIE_PORT_SERVICE_PME; pos = PCI_CFG_SPACE_SIZE;