Skip to contentSkip to conversation

pcie port driver: correctly detect native PME feature

PATCH New Shaohua Li 1 participant 1 message Oct 24, 2007 PCI

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/pci/pcie/portdrv_core.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/pci/pcie/portdrv_core.c +2 -3
Index: linux/drivers/pci/pcie/portdrv_core.c
===================================================================
@@ -192,9 +192,8 @@ static int get_port_device_capability(st
 		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;