]> err.no Git - linux-2.6/commitdiff
pcie port driver: correctly detect native PME feature
authorShaohua Li <shaohua.li@intel.com>
Wed, 24 Oct 2007 02:43:23 +0000 (10:43 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Feb 2008 23:04:18 +0000 (15:04 -0800)
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 <shaohua.li@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/pcie/portdrv_core.c

index b20a9b81dae2df5e9cca491b4c1504def575858c..23d9eb073296dea5e974141c008ee2154b9b6257 100644 (file)
@@ -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;