Commit 0f245623 authored by Andi Kleen's avatar Andi Kleen

Merge branches 'acpica-release-fixes', 'ec-fix', 'dock', 'irq-bounds',...

Merge branches 'acpica-release-fixes', 'ec-fix', 'dock', 'irq-bounds', 'thermal-fix', 'wmi' and 'acpi-cleanups' into release-2.6.27
...@@ -563,9 +563,6 @@ EXPORT_SYMBOL_GPL(unregister_hotplug_dock_device); ...@@ -563,9 +563,6 @@ EXPORT_SYMBOL_GPL(unregister_hotplug_dock_device);
*/ */
static int handle_eject_request(struct dock_station *ds, u32 event) static int handle_eject_request(struct dock_station *ds, u32 event)
{ {
if (!dock_present(ds))
return -ENODEV;
if (dock_in_progress(ds)) if (dock_in_progress(ds))
return -EBUSY; return -EBUSY;
...@@ -573,8 +570,16 @@ static int handle_eject_request(struct dock_station *ds, u32 event) ...@@ -573,8 +570,16 @@ static int handle_eject_request(struct dock_station *ds, u32 event)
* here we need to generate the undock * here we need to generate the undock
* event prior to actually doing the undock * event prior to actually doing the undock
* so that the device struct still exists. * so that the device struct still exists.
* Also, even send the dock event if the
* device is not present anymore
*/ */
dock_event(ds, event, UNDOCK_EVENT); dock_event(ds, event, UNDOCK_EVENT);
if (!dock_present(ds)) {
complete_undock(ds);
return -ENODEV;
}
hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST); hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST);
undock(ds); undock(ds);
eject_dock(ds); eject_dock(ds);
......
...@@ -110,6 +110,31 @@ static struct acpi_ec { ...@@ -110,6 +110,31 @@ static struct acpi_ec {
u8 handlers_installed; u8 handlers_installed;
} *boot_ec, *first_ec; } *boot_ec, *first_ec;
/*
* Some Asus system have exchanged ECDT data/command IO addresses.
*/
static int print_ecdt_error(const struct dmi_system_id *id)
{
printk(KERN_NOTICE PREFIX "%s detected - "
"ECDT has exchanged control/data I/O address\n",
id->ident);
return 0;
}
static struct dmi_system_id __cpuinitdata ec_dmi_table[] = {
{
print_ecdt_error, "Asus L4R", {
DMI_MATCH(DMI_BIOS_VERSION, "1008.006"),
DMI_MATCH(DMI_PRODUCT_NAME, "L4R"),
DMI_MATCH(DMI_BOARD_NAME, "L4R") }, NULL},
{
print_ecdt_error, "Asus M6R", {
DMI_MATCH(DMI_BIOS_VERSION, "0207"),
DMI_MATCH(DMI_PRODUCT_NAME, "M6R"),
DMI_MATCH(DMI_BOARD_NAME, "M6R") }, NULL},
{},
};
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
Transaction Management Transaction Management
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
...@@ -196,6 +221,8 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) ...@@ -196,6 +221,8 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll)
return 0; return 0;
msleep(1); msleep(1);
} }
if (acpi_ec_check_status(ec,event))
return 0;
} }
pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n", pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n",
acpi_ec_read_status(ec), acpi_ec_read_status(ec),
...@@ -911,6 +938,15 @@ int __init acpi_ec_ecdt_probe(void) ...@@ -911,6 +938,15 @@ int __init acpi_ec_ecdt_probe(void)
pr_info(PREFIX "EC description table is found, configuring boot EC\n"); pr_info(PREFIX "EC description table is found, configuring boot EC\n");
boot_ec->command_addr = ecdt_ptr->control.address; boot_ec->command_addr = ecdt_ptr->control.address;
boot_ec->data_addr = ecdt_ptr->data.address; boot_ec->data_addr = ecdt_ptr->data.address;
if (dmi_check_system(ec_dmi_table)) {
/*
* If the board falls into ec_dmi_table, it means
* that ECDT table gives the incorrect command/status
* & data I/O address. Just fix it.
*/
boot_ec->data_addr = ecdt_ptr->control.address;
boot_ec->command_addr = ecdt_ptr->data.address;
}
boot_ec->gpe = ecdt_ptr->gpe; boot_ec->gpe = ecdt_ptr->gpe;
boot_ec->handle = ACPI_ROOT_OBJECT; boot_ec->handle = ACPI_ROOT_OBJECT;
acpi_get_handle(ACPI_ROOT_OBJECT, ecdt_ptr->id, &boot_ec->handle); acpi_get_handle(ACPI_ROOT_OBJECT, ecdt_ptr->id, &boot_ec->handle);
......
...@@ -849,7 +849,7 @@ static int __init acpi_irq_penalty_update(char *str, int used) ...@@ -849,7 +849,7 @@ static int __init acpi_irq_penalty_update(char *str, int used)
if (irq < 0) if (irq < 0)
continue; continue;
if (irq >= ACPI_MAX_IRQS) if (irq >= ARRAY_SIZE(acpi_irq_penalty))
continue; continue;
if (used) if (used)
...@@ -872,10 +872,12 @@ static int __init acpi_irq_penalty_update(char *str, int used) ...@@ -872,10 +872,12 @@ static int __init acpi_irq_penalty_update(char *str, int used)
*/ */
void acpi_penalize_isa_irq(int irq, int active) void acpi_penalize_isa_irq(int irq, int active)
{ {
if (active) if (irq >= 0 && irq < ARRAY_SIZE(acpi_irq_penalty)) {
acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED; if (active)
else acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED;
acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING; else
acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
}
} }
/* /*
......
...@@ -123,7 +123,7 @@ struct acpi_processor_errata errata __read_mostly; ...@@ -123,7 +123,7 @@ struct acpi_processor_errata errata __read_mostly;
static int set_no_mwait(const struct dmi_system_id *id) static int set_no_mwait(const struct dmi_system_id *id)
{ {
printk(KERN_NOTICE PREFIX "%s detected - " printk(KERN_NOTICE PREFIX "%s detected - "
"disable mwait for CPU C-stetes\n", id->ident); "disabling mwait for CPU C-states\n", id->ident);
idle_nomwait = 1; idle_nomwait = 1;
return 0; return 0;
} }
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include <linux/pm_qos_params.h> #include <linux/pm_qos_params.h>
#include <linux/clockchips.h> #include <linux/clockchips.h>
#include <linux/cpuidle.h> #include <linux/cpuidle.h>
#include <linux/cpuidle.h>
/* /*
* Include the apic definitions for x86 to have the APIC timer related defines * Include the apic definitions for x86 to have the APIC timer related defines
......
...@@ -70,7 +70,7 @@ static DEFINE_MUTEX(performance_mutex); ...@@ -70,7 +70,7 @@ static DEFINE_MUTEX(performance_mutex);
* 0 -> cpufreq low level drivers initialized -> consider _PPC values * 0 -> cpufreq low level drivers initialized -> consider _PPC values
* 1 -> ignore _PPC totally -> forced by user through boot param * 1 -> ignore _PPC totally -> forced by user through boot param
*/ */
static unsigned int ignore_ppc = -1; static int ignore_ppc = -1;
module_param(ignore_ppc, uint, 0644); module_param(ignore_ppc, uint, 0644);
MODULE_PARM_DESC(ignore_ppc, "If the frequency of your machine gets wrongly" \ MODULE_PARM_DESC(ignore_ppc, "If the frequency of your machine gets wrongly" \
"limited by BIOS, this should help"); "limited by BIOS, this should help");
......
...@@ -347,7 +347,7 @@ struct acpi_buffer *out) ...@@ -347,7 +347,7 @@ struct acpi_buffer *out)
strcpy(method, "WQ"); strcpy(method, "WQ");
strncat(method, block->object_id, 2); strncat(method, block->object_id, 2);
status = acpi_evaluate_object(handle, method, NULL, out); status = acpi_evaluate_object(handle, method, &input, out);
/* /*
* If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if
......
...@@ -803,11 +803,30 @@ static acpi_status get_u32(u32 *value, u32 cap) ...@@ -803,11 +803,30 @@ static acpi_status get_u32(u32 *value, u32 cap)
static acpi_status set_u32(u32 value, u32 cap) static acpi_status set_u32(u32 value, u32 cap)
{ {
acpi_status status;
if (interface->capability & cap) { if (interface->capability & cap) {
switch (interface->type) { switch (interface->type) {
case ACER_AMW0: case ACER_AMW0:
return AMW0_set_u32(value, cap, interface); return AMW0_set_u32(value, cap, interface);
case ACER_AMW0_V2: case ACER_AMW0_V2:
if (cap == ACER_CAP_MAILLED)
return AMW0_set_u32(value, cap, interface);
/*
* On some models, some WMID methods don't toggle
* properly. For those cases, we want to run the AMW0
* method afterwards to be certain we've really toggled
* the device state.
*/
if (cap == ACER_CAP_WIRELESS ||
cap == ACER_CAP_BLUETOOTH) {
status = WMID_set_u32(value, cap, interface);
if (ACPI_FAILURE(status))
return status;
return AMW0_set_u32(value, cap, interface);
}
case ACER_WMID: case ACER_WMID:
return WMID_set_u32(value, cap, interface); return WMID_set_u32(value, cap, interface);
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment