The patch titled
PCI PM: support PM CAP version 3
has been added to the -mm tree. Its filename is
pci-pm-support-pm-cap-version-3.patch
Patches currently in -mm which might be from [EMAIL PROTECTED] are
pci-pm-support-pm-cap-version-3.patch
yenta-make-topic95-bridges-work-with-16bit-cards.patch
From: Daniel Ritz <[EMAIL PROTECTED]>
- support PCI PM CAP version 3 (as defined in PCI PM Interface Spec v1.2)
- pci/probe.c sets the PM state initially to 4 which is D3cold. add a
PCI_UNKNOWN
- minor cleanups
Signed-off-by: Daniel Ritz <[EMAIL PROTECTED]>
Cc: Greg KH <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
drivers/pci/pci.c | 12 +++++-------
drivers/pci/probe.c | 2 +-
include/linux/pci.h | 1 +
3 files changed, 7 insertions(+), 8 deletions(-)
diff -puN drivers/pci/pci.c~pci-pm-support-pm-cap-version-3 drivers/pci/pci.c
--- 25/drivers/pci/pci.c~pci-pm-support-pm-cap-version-3 Wed Aug 17
15:32:07 2005
+++ 25-akpm/drivers/pci/pci.c Wed Aug 17 15:32:07 2005
@@ -294,7 +294,7 @@ pci_set_power_state(struct pci_dev *dev,
return -EIO;
pci_read_config_word(dev,pm + PCI_PM_PMC,&pmc);
- if ((pmc & PCI_PM_CAP_VER_MASK) > 2) {
+ if ((pmc & PCI_PM_CAP_VER_MASK) > 3) {
printk(KERN_DEBUG
"PCI: %s has unsupported PM cap regs version (%u)\n",
pci_name(dev), pmc & PCI_PM_CAP_VER_MASK);
@@ -302,12 +302,10 @@ pci_set_power_state(struct pci_dev *dev,
}
/* check if this device supports the desired state */
- if (state == PCI_D1 || state == PCI_D2) {
- if (state == PCI_D1 && !(pmc & PCI_PM_CAP_D1))
- return -EIO;
- else if (state == PCI_D2 && !(pmc & PCI_PM_CAP_D2))
- return -EIO;
- }
+ if (state == PCI_D1 && !(pmc & PCI_PM_CAP_D1))
+ return -EIO;
+ else if (state == PCI_D2 && !(pmc & PCI_PM_CAP_D2))
+ return -EIO;
pci_read_config_word(dev, pm + PCI_PM_CTRL, &pmcsr);
diff -puN drivers/pci/probe.c~pci-pm-support-pm-cap-version-3
drivers/pci/probe.c
--- 25/drivers/pci/probe.c~pci-pm-support-pm-cap-version-3 Wed Aug 17
15:32:07 2005
+++ 25-akpm/drivers/pci/probe.c Wed Aug 17 15:32:07 2005
@@ -584,7 +584,7 @@ static int pci_setup_device(struct pci_d
dev->vendor, dev->device, class, dev->hdr_type);
/* "Unknown power state" */
- dev->current_state = 4;
+ dev->current_state = PCI_UNKNOWN;
/* Early fixups, before probing the BARs */
pci_fixup_device(pci_fixup_early, dev);
diff -puN include/linux/pci.h~pci-pm-support-pm-cap-version-3
include/linux/pci.h
--- 25/include/linux/pci.h~pci-pm-support-pm-cap-version-3 Wed Aug 17
15:32:07 2005
+++ 25-akpm/include/linux/pci.h Wed Aug 17 15:32:07 2005
@@ -75,6 +75,7 @@ typedef int __bitwise pci_power_t;
#define PCI_D2 ((pci_power_t __force) 2)
#define PCI_D3hot ((pci_power_t __force) 3)
#define PCI_D3cold ((pci_power_t __force) 4)
+#define PCI_UNKNOWN ((pci_power_t __force) 5)
#define PCI_POWER_ERROR ((pci_power_t __force) -1)
/*
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html