diff options
author | Kyle McMartin <kyle@mcmartin.ca> | 2010-11-02 13:06:42 -0400 |
---|---|---|
committer | Kyle McMartin <kyle@mcmartin.ca> | 2010-11-02 13:06:42 -0400 |
commit | 7b2f649ec2da6640878c15298f5d3f8451dd8125 (patch) | |
tree | b26440ffa8853847fa0625f932673c7ff2554f2c /linux-2.6-enable-more-pci-autosuspend.patch | |
parent | 3daa57b3d93c5d0a795e3446850c83483df37f2e (diff) | |
download | kernel-7b2f649ec2da6640878c15298f5d3f8451dd8125.tar.gz kernel-7b2f649ec2da6640878c15298f5d3f8451dd8125.tar.xz kernel-7b2f649ec2da6640878c15298f5d3f8451dd8125.zip |
Linux 2.6.37-rc1
Diffstat (limited to 'linux-2.6-enable-more-pci-autosuspend.patch')
-rw-r--r-- | linux-2.6-enable-more-pci-autosuspend.patch | 276 |
1 files changed, 84 insertions, 192 deletions
diff --git a/linux-2.6-enable-more-pci-autosuspend.patch b/linux-2.6-enable-more-pci-autosuspend.patch index b1f92b134..666ded640 100644 --- a/linux-2.6-enable-more-pci-autosuspend.patch +++ b/linux-2.6-enable-more-pci-autosuspend.patch @@ -1,7 +1,20 @@ -diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h.mjg linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h ---- linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h.mjg 2010-10-04 13:52:05.086789354 -0400 -+++ linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h 2010-10-04 13:52:50.948801001 -0400 -@@ -406,16 +406,15 @@ struct acpi_predefined_data { + drivers/acpi/acpica/aclocal.h | 7 +-- + drivers/acpi/acpica/evgpe.c | 75 +++++++++++++++----------------- + drivers/acpi/acpica/evgpeinit.c | 11 +---- + drivers/acpi/acpica/evgpeutil.c | 5 +- + drivers/acpi/acpica/evxface.c | 23 +++++----- + drivers/acpi/ec.c | 2 +- + drivers/acpi/pci_bind.c | 86 ++++++++++++++++++++++++++++++++++++++ + drivers/acpi/sleep.c | 2 +- + drivers/char/ipmi/ipmi_si_intf.c | 2 +- + include/acpi/acpixf.h | 3 +- + 10 files changed, 143 insertions(+), 73 deletions(-) + +diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h +index 2ceb0c0..3663362 100644 +--- a/drivers/acpi/acpica/aclocal.h ++++ b/drivers/acpi/acpica/aclocal.h +@@ -406,17 +406,16 @@ struct acpi_predefined_data { * ****************************************************************************/ @@ -13,6 +26,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h.mjg linux-2.6.35.x86_ void *context; /* Context to be passed to handler */ - struct acpi_namespace_node *method_node; /* Method node for this GPE level (saved) */ u8 orig_flags; /* Original misc info about this GPE */ + u8 orig_enabled; /* Set if the GPE was originally enabled */ }; -union acpi_gpe_dispatch_info { @@ -20,7 +34,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h.mjg linux-2.6.35.x86_ struct acpi_namespace_node *method_node; /* Method node for this GPE level */ struct acpi_handler_info *handler; }; -@@ -425,7 +424,7 @@ union acpi_gpe_dispatch_info { +@@ -426,7 +425,7 @@ union acpi_gpe_dispatch_info { * NOTE: Important to keep this struct as small as possible. */ struct acpi_gpe_event_info { @@ -29,10 +43,11 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h.mjg linux-2.6.35.x86_ struct acpi_gpe_register_info *register_info; /* Backpointer to register info */ u8 flags; /* Misc info about this GPE */ u8 gpe_number; /* This GPE */ -diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c ---- linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg 2010-10-04 13:52:05.088789399 -0400 -+++ linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c 2010-10-04 13:52:50.950801045 -0400 -@@ -474,9 +474,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_as +diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c +index f226eac..c4b1c4c 100644 +--- a/drivers/acpi/acpica/evgpe.c ++++ b/drivers/acpi/acpica/evgpe.c +@@ -474,9 +474,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) * Must check for control method type dispatch one more time to avoid a * race with ev_gpe_install_handler */ @@ -43,7 +58,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg linux-2.6.35.x86_64 /* Allocate the evaluation information block */ info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); -@@ -575,41 +573,15 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_eve +@@ -575,41 +573,15 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) } /* @@ -93,7 +108,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg linux-2.6.35.x86_64 /* * Disable the GPE, so it doesn't keep firing before the method has a * chance to run (it runs asynchronously with interrupts enabled). -@@ -634,10 +606,34 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_eve +@@ -634,10 +606,34 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) "Unable to queue handler for GPE[0x%2X] - event disabled", gpe_number)); } @@ -111,7 +126,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg linux-2.6.35.x86_64 + dispatch. + handler-> + context); -+ + + /* It is now safe to clear level-triggered events. */ + + if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) == @@ -125,12 +140,12 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg linux-2.6.35.x86_64 + } + } + } - ++ + if (!(gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK)) { /* * No handler or method to run! * 03/2010: This case should no longer be possible. We will not allow -@@ -658,7 +654,6 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_eve +@@ -658,7 +654,6 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) gpe_number)); return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); } @@ -138,10 +153,11 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg linux-2.6.35.x86_64 } return_UINT32(ACPI_INTERRUPT_HANDLED); -diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeinit.c.mjg linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeinit.c ---- linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeinit.c.mjg 2010-10-04 13:52:05.089789421 -0400 -+++ linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeinit.c 2010-10-04 13:52:50.951801067 -0400 -@@ -392,16 +392,7 @@ acpi_ev_match_gpe_method(acpi_handle obj +diff --git a/drivers/acpi/acpica/evgpeinit.c b/drivers/acpi/acpica/evgpeinit.c +index 2c7def9..9915b52 100644 +--- a/drivers/acpi/acpica/evgpeinit.c ++++ b/drivers/acpi/acpica/evgpeinit.c +@@ -386,16 +386,7 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle, return_ACPI_STATUS(AE_OK); } @@ -159,10 +175,11 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeinit.c.mjg linux-2.6.35.x8 /* * If there is already a method, ignore this method. But check * for a type mismatch (if both the _Lxx AND _Exx exist) -diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeutil.c.mjg linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeutil.c ---- linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeutil.c.mjg 2010-10-04 13:52:05.090789443 -0400 -+++ linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeutil.c 2010-10-04 13:52:50.952801089 -0400 -@@ -323,12 +323,11 @@ acpi_ev_delete_gpe_handlers(struct acpi_ +diff --git a/drivers/acpi/acpica/evgpeutil.c b/drivers/acpi/acpica/evgpeutil.c +index 19a0e51..434ad1b 100644 +--- a/drivers/acpi/acpica/evgpeutil.c ++++ b/drivers/acpi/acpica/evgpeutil.c +@@ -323,12 +323,11 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, ACPI_GPE_REGISTER_WIDTH) + j]; @@ -177,10 +194,11 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeutil.c.mjg linux-2.6.35.x8 } } } -diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c ---- linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg 2010-10-04 13:52:05.092789487 -0400 -+++ linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c 2010-10-04 13:52:50.954801133 -0400 -@@ -662,6 +662,8 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_ha +diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c +index 36af222..b097136 100644 +--- a/drivers/acpi/acpica/evxface.c ++++ b/drivers/acpi/acpica/evxface.c +@@ -662,6 +662,8 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler) * edge- or level-triggered interrupt. * Address - Address of the handler * Context - Value passed to the handler on each GPE @@ -189,7 +207,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_ * * RETURN: Status * -@@ -671,7 +673,8 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_ha +@@ -671,7 +673,8 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler) acpi_status acpi_install_gpe_handler(acpi_handle gpe_device, u32 gpe_number, @@ -199,7 +217,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_ { struct acpi_gpe_event_info *gpe_event_info; struct acpi_handler_info *handler; -@@ -711,8 +714,7 @@ acpi_install_gpe_handler(acpi_handle gpe +@@ -711,8 +714,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, /* Make sure that there isn't a handler there already */ @@ -209,7 +227,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_ status = AE_ALREADY_EXISTS; goto free_and_exit; } -@@ -721,7 +723,6 @@ acpi_install_gpe_handler(acpi_handle gpe +@@ -721,7 +723,6 @@ acpi_install_gpe_handler(acpi_handle gpe_device, handler->address = address; handler->context = context; @@ -217,15 +235,16 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_ handler->orig_flags = gpe_event_info->flags & (ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); -@@ -733,17 +734,17 @@ acpi_install_gpe_handler(acpi_handle gpe +@@ -732,7 +733,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, */ if ((handler->orig_flags & ACPI_GPE_DISPATCH_METHOD) -- && !(gpe_event_info->flags & ACPI_GPE_CAN_WAKE)) -+ && !(gpe_event_info->flags & ACPI_GPE_CAN_WAKE) && !keep_method) +- && gpe_event_info->runtime_count) { ++ && gpe_event_info->runtime_count && !keep_method) { + handler->orig_enabled = 1; (void)acpi_raw_disable_gpe(gpe_event_info); - - /* Install the handler */ + } +@@ -741,10 +742,10 @@ acpi_install_gpe_handler(acpi_handle gpe_device, gpe_event_info->dispatch.handler = handler; @@ -239,7 +258,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_ gpe_event_info->flags |= (u8) (type | ACPI_GPE_DISPATCH_HANDLER); acpi_os_release_lock(acpi_gbl_gpe_lock, flags); -@@ -812,8 +813,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_ +@@ -813,8 +814,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, /* Make sure that a handler is indeed installed */ @@ -249,7 +268,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_ status = AE_NOT_EXIST; goto unlock_and_exit; } -@@ -829,9 +829,8 @@ acpi_remove_gpe_handler(acpi_handle gpe_ +@@ -830,9 +830,8 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, handler = gpe_event_info->dispatch.handler; @@ -260,10 +279,11 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_ gpe_event_info->flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); gpe_event_info->flags |= handler->orig_flags; -diff -up linux-2.6.35.x86_64/drivers/acpi/ec.c.mjg linux-2.6.35.x86_64/drivers/acpi/ec.c ---- linux-2.6.35.x86_64/drivers/acpi/ec.c.mjg 2010-10-04 13:52:05.094789531 -0400 -+++ linux-2.6.35.x86_64/drivers/acpi/ec.c 2010-10-04 13:52:50.955801156 -0400 -@@ -746,7 +746,7 @@ static int ec_install_handlers(struct ac +diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c +index 372ff80..9a39f82 100644 +--- a/drivers/acpi/ec.c ++++ b/drivers/acpi/ec.c +@@ -740,7 +740,7 @@ static int ec_install_handlers(struct acpi_ec *ec) return 0; status = acpi_install_gpe_handler(NULL, ec->gpe, ACPI_GPE_EDGE_TRIGGERED, @@ -272,9 +292,10 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/ec.c.mjg linux-2.6.35.x86_64/drivers/a if (ACPI_FAILURE(status)) return -ENODEV; -diff -up linux-2.6.35.x86_64/drivers/acpi/pci_bind.c.mjg linux-2.6.35.x86_64/drivers/acpi/pci_bind.c ---- linux-2.6.35.x86_64/drivers/acpi/pci_bind.c.mjg 2010-10-04 13:52:05.102789707 -0400 -+++ linux-2.6.35.x86_64/drivers/acpi/pci_bind.c 2010-10-04 13:52:50.962801311 -0400 +diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c +index 2ef0409..8b3cc6a 100644 +--- a/drivers/acpi/pci_bind.c ++++ b/drivers/acpi/pci_bind.c @@ -28,6 +28,7 @@ #include <linux/pci.h> #include <linux/pci-acpi.h> @@ -327,7 +348,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/pci_bind.c.mjg linux-2.6.35.x86_64/dri static int acpi_pci_unbind(struct acpi_device *device) { struct pci_dev *dev; -@@ -43,6 +81,30 @@ static int acpi_pci_unbind(struct acpi_d +@@ -43,6 +81,30 @@ static int acpi_pci_unbind(struct acpi_device *device) if (!dev) goto out; @@ -358,7 +379,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/pci_bind.c.mjg linux-2.6.35.x86_64/dri device_set_run_wake(&dev->dev, false); pci_acpi_remove_pm_notifier(device); -@@ -71,6 +133,30 @@ static int acpi_pci_bind(struct acpi_dev +@@ -71,6 +133,30 @@ static int acpi_pci_bind(struct acpi_device *device) return 0; pci_acpi_add_pm_notifier(device, dev); @@ -389,25 +410,24 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/pci_bind.c.mjg linux-2.6.35.x86_64/dri if (device->wakeup.flags.run_wake) device_set_run_wake(&dev->dev, true); -diff -up linux-2.6.35.x86_64/drivers/acpi/sleep.c.mjg linux-2.6.35.x86_64/drivers/acpi/sleep.c ---- linux-2.6.35.x86_64/drivers/acpi/sleep.c.mjg 2010-10-04 13:52:05.103789729 -0400 -+++ linux-2.6.35.x86_64/drivers/acpi/sleep.c 2010-10-04 13:52:50.963801333 -0400 -@@ -631,9 +631,9 @@ int acpi_pm_device_sleep_state(struct de - acpi_method[3] = 'W'; - status = acpi_evaluate_integer(handle, acpi_method, NULL, - &d_max); -- if (ACPI_FAILURE(status)) { -+ if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { - d_max = d_min; +diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c +index 721d93b..b0ddef6 100644 +--- a/drivers/acpi/sleep.c ++++ b/drivers/acpi/sleep.c +@@ -643,7 +643,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p) + if (acpi_target_sleep_state != ACPI_STATE_S0 || + status != AE_NOT_FOUND) + d_max = d_min; - } else if (d_max < d_min) { + } else if (ACPI_SUCCESS(status) && d_max < d_min) { /* Warn the user of the broken DSDT */ printk(KERN_WARNING "ACPI: Wrong value from %s\n", acpi_method); -diff -up linux-2.6.35.x86_64/drivers/char/ipmi/ipmi_si_intf.c.mjg linux-2.6.35.x86_64/drivers/char/ipmi/ipmi_si_intf.c ---- linux-2.6.35.x86_64/drivers/char/ipmi/ipmi_si_intf.c.mjg 2010-10-04 13:52:05.097789597 -0400 -+++ linux-2.6.35.x86_64/drivers/char/ipmi/ipmi_si_intf.c 2010-10-04 13:52:50.958801223 -0400 -@@ -1959,7 +1959,7 @@ static int acpi_gpe_irq_setup(struct smi +diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c +index 035da9e..62a48b2 100644 +--- a/drivers/char/ipmi/ipmi_si_intf.c ++++ b/drivers/char/ipmi/ipmi_si_intf.c +@@ -1970,7 +1970,7 @@ static int acpi_gpe_irq_setup(struct smi_info *info) info->irq, ACPI_GPE_LEVEL_TRIGGERED, &ipmi_acpi_gpe, @@ -416,126 +436,11 @@ diff -up linux-2.6.35.x86_64/drivers/char/ipmi/ipmi_si_intf.c.mjg linux-2.6.35.x if (status != AE_OK) { dev_warn(info->dev, "%s unable to claim ACPI GPE %d," " running polled\n", DEVICE_NAME, info->irq); -diff -up linux-2.6.35.x86_64/drivers/pci/pci.c.mjg linux-2.6.35.x86_64/drivers/pci/pci.c ---- linux-2.6.35.x86_64/drivers/pci/pci.c.mjg 2010-10-04 13:52:05.105789773 -0400 -+++ linux-2.6.35.x86_64/drivers/pci/pci.c 2010-10-04 13:52:50.965801377 -0400 -@@ -38,6 +38,19 @@ EXPORT_SYMBOL(pci_pci_problems); - - unsigned int pci_pm_d3_delay; - -+static void pci_pme_list_scan(struct work_struct *work); -+ -+static LIST_HEAD(pci_pme_list); -+static DEFINE_MUTEX(pci_pme_list_mutex); -+static DECLARE_DELAYED_WORK(pci_pme_work, pci_pme_list_scan); -+ -+struct pci_pme_device { -+ struct list_head list; -+ struct pci_dev *dev; -+}; -+ -+#define PME_TIMEOUT 1000 /* How long between PME checks */ -+ - static void pci_dev_d3_sleep(struct pci_dev *dev) - { - unsigned int delay = dev->d3_delay; -@@ -1331,6 +1344,32 @@ bool pci_pme_capable(struct pci_dev *dev - return !!(dev->pme_support & (1 << state)); - } - -+static void pci_pme_list_scan(struct work_struct *work) -+{ -+ struct pci_pme_device *pme_dev; -+ -+ mutex_lock(&pci_pme_list_mutex); -+ if (!list_empty(&pci_pme_list)) { -+ list_for_each_entry(pme_dev, &pci_pme_list, list) -+ pci_pme_wakeup(pme_dev->dev, NULL); -+ schedule_delayed_work(&pci_pme_work, msecs_to_jiffies(PME_TIMEOUT)); -+ } -+ mutex_unlock(&pci_pme_list_mutex); -+} -+ -+/** -+ * pci_external_pme - is a device an external PCI PME source? -+ * @dev: PCI device to check -+ * -+ */ -+ -+static bool pci_external_pme(struct pci_dev *dev) -+{ -+ if (pci_is_pcie(dev) || dev->bus->number == 0) -+ return false; -+ return true; -+} -+ - /** - * pci_pme_active - enable or disable PCI device's PME# function - * @dev: PCI device to handle. -@@ -1354,6 +1393,44 @@ void pci_pme_active(struct pci_dev *dev, - - pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, pmcsr); - -+ /* PCI (as opposed to PCIe) PME requires that the device have -+ its PME# line hooked up correctly. Not all hardware vendors -+ do this, so the PME never gets delivered and the device -+ remains asleep. The easiest way around this is to -+ periodically walk the list of suspended devices and check -+ whether any have their PME flag set. The assumption is that -+ we'll wake up often enough anyway that this won't be a huge -+ hit, and the power savings from the devices will still be a -+ win. */ -+ -+ if (pci_external_pme(dev)) { -+ struct pci_pme_device *pme_dev; -+ if (enable) { -+ pme_dev = kmalloc(sizeof(struct pci_pme_device), -+ GFP_KERNEL); -+ if (!pme_dev) -+ goto out; -+ pme_dev->dev = dev; -+ mutex_lock(&pci_pme_list_mutex); -+ list_add(&pme_dev->list, &pci_pme_list); -+ if (list_is_singular(&pci_pme_list)) -+ schedule_delayed_work(&pci_pme_work, -+ msecs_to_jiffies(PME_TIMEOUT)); -+ mutex_unlock(&pci_pme_list_mutex); -+ } else { -+ mutex_lock(&pci_pme_list_mutex); -+ list_for_each_entry(pme_dev, &pci_pme_list, list) { -+ if (pme_dev->dev == dev) { -+ list_del(&pme_dev->list); -+ kfree(pme_dev); -+ break; -+ } -+ } -+ mutex_unlock(&pci_pme_list_mutex); -+ } -+ } -+ -+out: - dev_printk(KERN_DEBUG, &dev->dev, "PME# %s\n", - enable ? "enabled" : "disabled"); - } -diff -up linux-2.6.35.x86_64/drivers/pci/pci.h.mjg linux-2.6.35.x86_64/drivers/pci/pci.h ---- linux-2.6.35.x86_64/drivers/pci/pci.h.mjg 2010-10-04 13:52:05.100789663 -0400 -+++ linux-2.6.35.x86_64/drivers/pci/pci.h 2010-10-04 13:52:50.960801267 -0400 -@@ -63,11 +63,8 @@ struct pci_platform_pm_ops { - extern int pci_set_platform_pm(struct pci_platform_pm_ops *ops); - extern void pci_update_current_state(struct pci_dev *dev, pci_power_t state); - extern void pci_disable_enabled_device(struct pci_dev *dev); --extern bool pci_check_pme_status(struct pci_dev *dev); - extern int pci_finish_runtime_suspend(struct pci_dev *dev); --extern void pci_wakeup_event(struct pci_dev *dev); - extern int __pci_pme_wakeup(struct pci_dev *dev, void *ign); --extern void pci_pme_wakeup_bus(struct pci_bus *bus); - extern void pci_pm_init(struct pci_dev *dev); - extern void platform_pci_wakeup_init(struct pci_dev *dev); - extern void pci_allocate_cap_save_buffers(struct pci_dev *dev); -diff -up linux-2.6.35.x86_64/include/acpi/acpixf.h.mjg linux-2.6.35.x86_64/include/acpi/acpixf.h ---- linux-2.6.35.x86_64/include/acpi/acpixf.h.mjg 2010-10-04 13:52:05.099789641 -0400 -+++ linux-2.6.35.x86_64/include/acpi/acpixf.h 2010-10-04 13:52:50.959801245 -0400 -@@ -253,7 +253,8 @@ acpi_remove_address_space_handler(acpi_h +diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h +index 53b7cfd..740eb7e 100644 +--- a/include/acpi/acpixf.h ++++ b/include/acpi/acpixf.h +@@ -258,7 +258,8 @@ acpi_remove_address_space_handler(acpi_handle device, acpi_status acpi_install_gpe_handler(acpi_handle gpe_device, u32 gpe_number, @@ -545,16 +450,3 @@ diff -up linux-2.6.35.x86_64/include/acpi/acpixf.h.mjg linux-2.6.35.x86_64/inclu acpi_status acpi_remove_gpe_handler(acpi_handle gpe_device, -diff -up linux-2.6.35.x86_64/include/linux/pci.h.mjg linux-2.6.35.x86_64/include/linux/pci.h ---- linux-2.6.35.x86_64/include/linux/pci.h.mjg 2010-10-04 13:52:05.101789685 -0400 -+++ linux-2.6.35.x86_64/include/linux/pci.h 2010-10-04 13:52:50.962801311 -0400 -@@ -819,6 +819,9 @@ pci_power_t pci_target_state(struct pci_ - int pci_prepare_to_sleep(struct pci_dev *dev); - int pci_back_from_sleep(struct pci_dev *dev); - bool pci_dev_run_wake(struct pci_dev *dev); -+bool pci_check_pme_status(struct pci_dev *dev); -+void pci_wakeup_event(struct pci_dev *dev); -+void pci_pme_wakeup_bus(struct pci_bus *bus); - - static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, - bool enable) |