diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/dock.c | 11 | ||||
-rw-r--r-- | drivers/acpi/ec.c | 36 | ||||
-rw-r--r-- | drivers/acpi/pci_link.c | 12 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 2 | ||||
-rw-r--r-- | drivers/acpi/processor_idle.c | 1 | ||||
-rw-r--r-- | drivers/acpi/processor_perflib.c | 2 | ||||
-rw-r--r-- | drivers/acpi/wmi.c | 2 |
7 files changed, 54 insertions, 12 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index bb7c51f712bd..7d2edf143f16 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -563,9 +563,6 @@ EXPORT_SYMBOL_GPL(unregister_hotplug_dock_device); | |||
563 | */ | 563 | */ |
564 | static int handle_eject_request(struct dock_station *ds, u32 event) | 564 | static int handle_eject_request(struct dock_station *ds, u32 event) |
565 | { | 565 | { |
566 | if (!dock_present(ds)) | ||
567 | return -ENODEV; | ||
568 | |||
569 | if (dock_in_progress(ds)) | 566 | if (dock_in_progress(ds)) |
570 | return -EBUSY; | 567 | return -EBUSY; |
571 | 568 | ||
@@ -573,8 +570,16 @@ static int handle_eject_request(struct dock_station *ds, u32 event) | |||
573 | * here we need to generate the undock | 570 | * here we need to generate the undock |
574 | * event prior to actually doing the undock | 571 | * event prior to actually doing the undock |
575 | * so that the device struct still exists. | 572 | * so that the device struct still exists. |
573 | * Also, even send the dock event if the | ||
574 | * device is not present anymore | ||
576 | */ | 575 | */ |
577 | dock_event(ds, event, UNDOCK_EVENT); | 576 | dock_event(ds, event, UNDOCK_EVENT); |
577 | |||
578 | if (!dock_present(ds)) { | ||
579 | complete_undock(ds); | ||
580 | return -ENODEV; | ||
581 | } | ||
582 | |||
578 | hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST); | 583 | hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST); |
579 | undock(ds); | 584 | undock(ds); |
580 | eject_dock(ds); | 585 | eject_dock(ds); |
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 5622aee996b2..13593f9f2197 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -110,6 +110,31 @@ static struct acpi_ec { | |||
110 | u8 handlers_installed; | 110 | u8 handlers_installed; |
111 | } *boot_ec, *first_ec; | 111 | } *boot_ec, *first_ec; |
112 | 112 | ||
113 | /* | ||
114 | * Some Asus system have exchanged ECDT data/command IO addresses. | ||
115 | */ | ||
116 | static int print_ecdt_error(const struct dmi_system_id *id) | ||
117 | { | ||
118 | printk(KERN_NOTICE PREFIX "%s detected - " | ||
119 | "ECDT has exchanged control/data I/O address\n", | ||
120 | id->ident); | ||
121 | return 0; | ||
122 | } | ||
123 | |||
124 | static struct dmi_system_id __cpuinitdata ec_dmi_table[] = { | ||
125 | { | ||
126 | print_ecdt_error, "Asus L4R", { | ||
127 | DMI_MATCH(DMI_BIOS_VERSION, "1008.006"), | ||
128 | DMI_MATCH(DMI_PRODUCT_NAME, "L4R"), | ||
129 | DMI_MATCH(DMI_BOARD_NAME, "L4R") }, NULL}, | ||
130 | { | ||
131 | print_ecdt_error, "Asus M6R", { | ||
132 | DMI_MATCH(DMI_BIOS_VERSION, "0207"), | ||
133 | DMI_MATCH(DMI_PRODUCT_NAME, "M6R"), | ||
134 | DMI_MATCH(DMI_BOARD_NAME, "M6R") }, NULL}, | ||
135 | {}, | ||
136 | }; | ||
137 | |||
113 | /* -------------------------------------------------------------------------- | 138 | /* -------------------------------------------------------------------------- |
114 | Transaction Management | 139 | Transaction Management |
115 | -------------------------------------------------------------------------- */ | 140 | -------------------------------------------------------------------------- */ |
@@ -196,6 +221,8 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) | |||
196 | return 0; | 221 | return 0; |
197 | msleep(1); | 222 | msleep(1); |
198 | } | 223 | } |
224 | if (acpi_ec_check_status(ec,event)) | ||
225 | return 0; | ||
199 | } | 226 | } |
200 | pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n", | 227 | pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n", |
201 | acpi_ec_read_status(ec), | 228 | acpi_ec_read_status(ec), |
@@ -911,6 +938,15 @@ int __init acpi_ec_ecdt_probe(void) | |||
911 | pr_info(PREFIX "EC description table is found, configuring boot EC\n"); | 938 | pr_info(PREFIX "EC description table is found, configuring boot EC\n"); |
912 | boot_ec->command_addr = ecdt_ptr->control.address; | 939 | boot_ec->command_addr = ecdt_ptr->control.address; |
913 | boot_ec->data_addr = ecdt_ptr->data.address; | 940 | boot_ec->data_addr = ecdt_ptr->data.address; |
941 | if (dmi_check_system(ec_dmi_table)) { | ||
942 | /* | ||
943 | * If the board falls into ec_dmi_table, it means | ||
944 | * that ECDT table gives the incorrect command/status | ||
945 | * & data I/O address. Just fix it. | ||
946 | */ | ||
947 | boot_ec->data_addr = ecdt_ptr->control.address; | ||
948 | boot_ec->command_addr = ecdt_ptr->data.address; | ||
949 | } | ||
914 | boot_ec->gpe = ecdt_ptr->gpe; | 950 | boot_ec->gpe = ecdt_ptr->gpe; |
915 | boot_ec->handle = ACPI_ROOT_OBJECT; | 951 | boot_ec->handle = ACPI_ROOT_OBJECT; |
916 | acpi_get_handle(ACPI_ROOT_OBJECT, ecdt_ptr->id, &boot_ec->handle); | 952 | acpi_get_handle(ACPI_ROOT_OBJECT, ecdt_ptr->id, &boot_ec->handle); |
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 89f3b2abfdc7..cf47805a7448 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c | |||
@@ -849,7 +849,7 @@ static int __init acpi_irq_penalty_update(char *str, int used) | |||
849 | if (irq < 0) | 849 | if (irq < 0) |
850 | continue; | 850 | continue; |
851 | 851 | ||
852 | if (irq >= ACPI_MAX_IRQS) | 852 | if (irq >= ARRAY_SIZE(acpi_irq_penalty)) |
853 | continue; | 853 | continue; |
854 | 854 | ||
855 | if (used) | 855 | if (used) |
@@ -872,10 +872,12 @@ static int __init acpi_irq_penalty_update(char *str, int used) | |||
872 | */ | 872 | */ |
873 | void acpi_penalize_isa_irq(int irq, int active) | 873 | void acpi_penalize_isa_irq(int irq, int active) |
874 | { | 874 | { |
875 | if (active) | 875 | if (irq >= 0 && irq < ARRAY_SIZE(acpi_irq_penalty)) { |
876 | acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED; | 876 | if (active) |
877 | else | 877 | acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED; |
878 | acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING; | 878 | else |
879 | acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING; | ||
880 | } | ||
879 | } | 881 | } |
880 | 882 | ||
881 | /* | 883 | /* |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index e36422a7122c..d3f0a62efcc1 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -123,7 +123,7 @@ struct acpi_processor_errata errata __read_mostly; | |||
123 | static int set_no_mwait(const struct dmi_system_id *id) | 123 | static int set_no_mwait(const struct dmi_system_id *id) |
124 | { | 124 | { |
125 | printk(KERN_NOTICE PREFIX "%s detected - " | 125 | printk(KERN_NOTICE PREFIX "%s detected - " |
126 | "disable mwait for CPU C-stetes\n", id->ident); | 126 | "disabling mwait for CPU C-states\n", id->ident); |
127 | idle_nomwait = 1; | 127 | idle_nomwait = 1; |
128 | return 0; | 128 | return 0; |
129 | } | 129 | } |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 283c08f5f4d4..cf5b1b7b684f 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <linux/pm_qos_params.h> | 41 | #include <linux/pm_qos_params.h> |
42 | #include <linux/clockchips.h> | 42 | #include <linux/clockchips.h> |
43 | #include <linux/cpuidle.h> | 43 | #include <linux/cpuidle.h> |
44 | #include <linux/cpuidle.h> | ||
45 | 44 | ||
46 | /* | 45 | /* |
47 | * Include the apic definitions for x86 to have the APIC timer related defines | 46 | * Include the apic definitions for x86 to have the APIC timer related defines |
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index 0133af49cf06..80e32093e977 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c | |||
@@ -70,7 +70,7 @@ static DEFINE_MUTEX(performance_mutex); | |||
70 | * 0 -> cpufreq low level drivers initialized -> consider _PPC values | 70 | * 0 -> cpufreq low level drivers initialized -> consider _PPC values |
71 | * 1 -> ignore _PPC totally -> forced by user through boot param | 71 | * 1 -> ignore _PPC totally -> forced by user through boot param |
72 | */ | 72 | */ |
73 | static unsigned int ignore_ppc = -1; | 73 | static int ignore_ppc = -1; |
74 | module_param(ignore_ppc, uint, 0644); | 74 | module_param(ignore_ppc, uint, 0644); |
75 | MODULE_PARM_DESC(ignore_ppc, "If the frequency of your machine gets wrongly" \ | 75 | MODULE_PARM_DESC(ignore_ppc, "If the frequency of your machine gets wrongly" \ |
76 | "limited by BIOS, this should help"); | 76 | "limited by BIOS, this should help"); |
diff --git a/drivers/acpi/wmi.c b/drivers/acpi/wmi.c index c33b1c6e93b1..cfe2c833474d 100644 --- a/drivers/acpi/wmi.c +++ b/drivers/acpi/wmi.c | |||
@@ -347,7 +347,7 @@ struct acpi_buffer *out) | |||
347 | strcpy(method, "WQ"); | 347 | strcpy(method, "WQ"); |
348 | strncat(method, block->object_id, 2); | 348 | strncat(method, block->object_id, 2); |
349 | 349 | ||
350 | status = acpi_evaluate_object(handle, method, NULL, out); | 350 | status = acpi_evaluate_object(handle, method, &input, out); |
351 | 351 | ||
352 | /* | 352 | /* |
353 | * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if | 353 | * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if |