diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-16 15:49:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-16 15:49:12 -0400 |
commit | 19695ec03d492f1eeb760727d3bd10c7d2f31c1d (patch) | |
tree | 0b9b95461a54b2dfd7efc89f2053d153b57d08ba /drivers | |
parent | 8e91f178a2bb4a3e52e76f6263c251ffb816eb17 (diff) | |
parent | 1b958a3e5353c2995f3550a20010bdb403f33831 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
acpi-wmi: unsigned cannot be less than 0
thinkpad-acpi: fix module autoloading for older models
acer-wmi: Unmark as 'experimental'
acpi-wmi: Unmark as 'experimental'
acer-wmi: double free in acer_rfkill_exit()
platform/x86: depends instead of select for laptop platform drivers
asus-laptop: use select instead of depends on
eeepc-laptop: restore acpi_generate_proc_event()
asus-laptop: restore acpi_generate_proc_event()
acpi: check for pxm_to_node_map overflow
ACPI: remove doubled status checking
ACPI suspend: Blacklist Toshiba Satellite L300 that requires to set SCI_EN directly on resume
Revert "ACPI: make some IO ports off-limits to AML"
suspend: switch the Asus Pundit P1-AH2 to old ACPI sleep ordering
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/bus.c | 9 | ||||
-rw-r--r-- | drivers/acpi/numa.c | 2 | ||||
-rw-r--r-- | drivers/acpi/osl.c | 50 | ||||
-rw-r--r-- | drivers/acpi/sleep.c | 16 | ||||
-rw-r--r-- | drivers/platform/x86/Kconfig | 14 | ||||
-rw-r--r-- | drivers/platform/x86/acer-wmi.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/asus-laptop.c | 5 | ||||
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 6 | ||||
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 8 | ||||
-rw-r--r-- | drivers/platform/x86/wmi.c | 2 |
10 files changed, 39 insertions, 75 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 765fd1c56cd6..bee64b73c919 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -758,8 +758,7 @@ static int __init acpi_bus_init(void) | |||
758 | acpi_status status = AE_OK; | 758 | acpi_status status = AE_OK; |
759 | extern acpi_status acpi_os_initialize1(void); | 759 | extern acpi_status acpi_os_initialize1(void); |
760 | 760 | ||
761 | 761 | acpi_os_initialize1(); | |
762 | status = acpi_os_initialize1(); | ||
763 | 762 | ||
764 | status = | 763 | status = |
765 | acpi_enable_subsystem(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE); | 764 | acpi_enable_subsystem(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE); |
@@ -769,12 +768,6 @@ static int __init acpi_bus_init(void) | |||
769 | goto error1; | 768 | goto error1; |
770 | } | 769 | } |
771 | 770 | ||
772 | if (ACPI_FAILURE(status)) { | ||
773 | printk(KERN_ERR PREFIX | ||
774 | "Unable to initialize ACPI OS objects\n"); | ||
775 | goto error1; | ||
776 | } | ||
777 | |||
778 | /* | 771 | /* |
779 | * ACPI 2.0 requires the EC driver to be loaded and work before | 772 | * ACPI 2.0 requires the EC driver to be loaded and work before |
780 | * the EC device is found in the namespace (i.e. before acpi_initialize_objects() | 773 | * the EC device is found in the namespace (i.e. before acpi_initialize_objects() |
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index c5e292aab0e3..3a0d8ef25c75 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -277,7 +277,7 @@ int acpi_get_node(acpi_handle *handle) | |||
277 | int pxm, node = -1; | 277 | int pxm, node = -1; |
278 | 278 | ||
279 | pxm = acpi_get_pxm(handle); | 279 | pxm = acpi_get_pxm(handle); |
280 | if (pxm >= 0) | 280 | if (pxm >= 0 && pxm < MAX_PXM_DOMAINS) |
281 | node = acpi_map_pxm_to_node(pxm); | 281 | node = acpi_map_pxm_to_node(pxm); |
282 | 282 | ||
283 | return node; | 283 | return node; |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index b3193ec0a2ef..1e35f342957c 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -1317,54 +1317,6 @@ acpi_os_validate_interface (char *interface) | |||
1317 | return AE_SUPPORT; | 1317 | return AE_SUPPORT; |
1318 | } | 1318 | } |
1319 | 1319 | ||
1320 | #ifdef CONFIG_X86 | ||
1321 | |||
1322 | struct aml_port_desc { | ||
1323 | uint start; | ||
1324 | uint end; | ||
1325 | char* name; | ||
1326 | char warned; | ||
1327 | }; | ||
1328 | |||
1329 | static struct aml_port_desc aml_invalid_port_list[] = { | ||
1330 | {0x20, 0x21, "PIC0", 0}, | ||
1331 | {0xA0, 0xA1, "PIC1", 0}, | ||
1332 | {0x4D0, 0x4D1, "ELCR", 0} | ||
1333 | }; | ||
1334 | |||
1335 | /* | ||
1336 | * valid_aml_io_address() | ||
1337 | * | ||
1338 | * if valid, return true | ||
1339 | * else invalid, warn once, return false | ||
1340 | */ | ||
1341 | static bool valid_aml_io_address(uint address, uint length) | ||
1342 | { | ||
1343 | int i; | ||
1344 | int entries = sizeof(aml_invalid_port_list) / sizeof(struct aml_port_desc); | ||
1345 | |||
1346 | for (i = 0; i < entries; ++i) { | ||
1347 | if ((address >= aml_invalid_port_list[i].start && | ||
1348 | address <= aml_invalid_port_list[i].end) || | ||
1349 | (address + length >= aml_invalid_port_list[i].start && | ||
1350 | address + length <= aml_invalid_port_list[i].end)) | ||
1351 | { | ||
1352 | if (!aml_invalid_port_list[i].warned) | ||
1353 | { | ||
1354 | printk(KERN_ERR "ACPI: Denied BIOS AML access" | ||
1355 | " to invalid port 0x%x+0x%x (%s)\n", | ||
1356 | address, length, | ||
1357 | aml_invalid_port_list[i].name); | ||
1358 | aml_invalid_port_list[i].warned = 1; | ||
1359 | } | ||
1360 | return false; /* invalid */ | ||
1361 | } | ||
1362 | } | ||
1363 | return true; /* valid */ | ||
1364 | } | ||
1365 | #else | ||
1366 | static inline bool valid_aml_io_address(uint address, uint length) { return true; } | ||
1367 | #endif | ||
1368 | /****************************************************************************** | 1320 | /****************************************************************************** |
1369 | * | 1321 | * |
1370 | * FUNCTION: acpi_os_validate_address | 1322 | * FUNCTION: acpi_os_validate_address |
@@ -1394,8 +1346,6 @@ acpi_os_validate_address ( | |||
1394 | 1346 | ||
1395 | switch (space_id) { | 1347 | switch (space_id) { |
1396 | case ACPI_ADR_SPACE_SYSTEM_IO: | 1348 | case ACPI_ADR_SPACE_SYSTEM_IO: |
1397 | if (!valid_aml_io_address(address, length)) | ||
1398 | return AE_AML_ILLEGAL_ADDRESS; | ||
1399 | case ACPI_ADR_SPACE_SYSTEM_MEMORY: | 1349 | case ACPI_ADR_SPACE_SYSTEM_MEMORY: |
1400 | /* Only interference checks against SystemIO and SytemMemory | 1350 | /* Only interference checks against SystemIO and SytemMemory |
1401 | are needed */ | 1351 | are needed */ |
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 519266654f06..00456fccfa38 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -378,6 +378,22 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { | |||
378 | DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"), | 378 | DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"), |
379 | }, | 379 | }, |
380 | }, | 380 | }, |
381 | { | ||
382 | .callback = init_old_suspend_ordering, | ||
383 | .ident = "Asus Pundit P1-AH2 (M2N8L motherboard)", | ||
384 | .matches = { | ||
385 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTek Computer INC."), | ||
386 | DMI_MATCH(DMI_BOARD_NAME, "M2N8L"), | ||
387 | }, | ||
388 | }, | ||
389 | { | ||
390 | .callback = init_set_sci_en_on_resume, | ||
391 | .ident = "Toshiba Satellite L300", | ||
392 | .matches = { | ||
393 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
394 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"), | ||
395 | }, | ||
396 | }, | ||
381 | {}, | 397 | {}, |
382 | }; | 398 | }; |
383 | #endif /* CONFIG_SUSPEND */ | 399 | #endif /* CONFIG_SUSPEND */ |
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index b3866ad50227..3608081bc3e0 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig | |||
@@ -15,8 +15,7 @@ menuconfig X86_PLATFORM_DEVICES | |||
15 | if X86_PLATFORM_DEVICES | 15 | if X86_PLATFORM_DEVICES |
16 | 16 | ||
17 | config ACER_WMI | 17 | config ACER_WMI |
18 | tristate "Acer WMI Laptop Extras (EXPERIMENTAL)" | 18 | tristate "Acer WMI Laptop Extras" |
19 | depends on EXPERIMENTAL | ||
20 | depends on ACPI | 19 | depends on ACPI |
21 | depends on LEDS_CLASS | 20 | depends on LEDS_CLASS |
22 | depends on NEW_LEDS | 21 | depends on NEW_LEDS |
@@ -39,9 +38,9 @@ config ASUS_LAPTOP | |||
39 | tristate "Asus Laptop Extras (EXPERIMENTAL)" | 38 | tristate "Asus Laptop Extras (EXPERIMENTAL)" |
40 | depends on ACPI | 39 | depends on ACPI |
41 | depends on EXPERIMENTAL && !ACPI_ASUS | 40 | depends on EXPERIMENTAL && !ACPI_ASUS |
42 | depends on LEDS_CLASS | 41 | select LEDS_CLASS |
43 | depends on NEW_LEDS | 42 | select NEW_LEDS |
44 | depends on BACKLIGHT_CLASS_DEVICE | 43 | select BACKLIGHT_CLASS_DEVICE |
45 | depends on INPUT | 44 | depends on INPUT |
46 | ---help--- | 45 | ---help--- |
47 | This is the new Linux driver for Asus laptops. It may also support some | 46 | This is the new Linux driver for Asus laptops. It may also support some |
@@ -185,11 +184,11 @@ config SONYPI_COMPAT | |||
185 | config THINKPAD_ACPI | 184 | config THINKPAD_ACPI |
186 | tristate "ThinkPad ACPI Laptop Extras" | 185 | tristate "ThinkPad ACPI Laptop Extras" |
187 | depends on ACPI | 186 | depends on ACPI |
187 | depends on INPUT | ||
188 | select BACKLIGHT_LCD_SUPPORT | 188 | select BACKLIGHT_LCD_SUPPORT |
189 | select BACKLIGHT_CLASS_DEVICE | 189 | select BACKLIGHT_CLASS_DEVICE |
190 | select HWMON | 190 | select HWMON |
191 | select NVRAM | 191 | select NVRAM |
192 | select INPUT | ||
193 | select NEW_LEDS | 192 | select NEW_LEDS |
194 | select LEDS_CLASS | 193 | select LEDS_CLASS |
195 | select NET | 194 | select NET |
@@ -315,9 +314,8 @@ config EEEPC_LAPTOP | |||
315 | 314 | ||
316 | 315 | ||
317 | config ACPI_WMI | 316 | config ACPI_WMI |
318 | tristate "WMI (EXPERIMENTAL)" | 317 | tristate "WMI" |
319 | depends on ACPI | 318 | depends on ACPI |
320 | depends on EXPERIMENTAL | ||
321 | help | 319 | help |
322 | This driver adds support for the ACPI-WMI (Windows Management | 320 | This driver adds support for the ACPI-WMI (Windows Management |
323 | Instrumentation) mapper device (PNP0C14) found on some systems. | 321 | Instrumentation) mapper device (PNP0C14) found on some systems. |
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 6bcca616a704..a6a42e8c060b 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c | |||
@@ -1026,7 +1026,7 @@ static void acer_rfkill_exit(void) | |||
1026 | kfree(wireless_rfkill->data); | 1026 | kfree(wireless_rfkill->data); |
1027 | rfkill_unregister(wireless_rfkill); | 1027 | rfkill_unregister(wireless_rfkill); |
1028 | if (has_cap(ACER_CAP_BLUETOOTH)) { | 1028 | if (has_cap(ACER_CAP_BLUETOOTH)) { |
1029 | kfree(wireless_rfkill->data); | 1029 | kfree(bluetooth_rfkill->data); |
1030 | rfkill_unregister(bluetooth_rfkill); | 1030 | rfkill_unregister(bluetooth_rfkill); |
1031 | } | 1031 | } |
1032 | return; | 1032 | return; |
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 56af6cf385b0..eeafc6c0160d 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c | |||
@@ -815,6 +815,7 @@ static int asus_setkeycode(struct input_dev *dev, int scancode, int keycode) | |||
815 | static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) | 815 | static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) |
816 | { | 816 | { |
817 | static struct key_entry *key; | 817 | static struct key_entry *key; |
818 | u16 count; | ||
818 | 819 | ||
819 | /* TODO Find a better way to handle events count. */ | 820 | /* TODO Find a better way to handle events count. */ |
820 | if (!hotk) | 821 | if (!hotk) |
@@ -832,9 +833,11 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) | |||
832 | lcd_blank(FB_BLANK_POWERDOWN); | 833 | lcd_blank(FB_BLANK_POWERDOWN); |
833 | } | 834 | } |
834 | 835 | ||
836 | count = hotk->event_count[event % 128]++; | ||
837 | acpi_bus_generate_proc_event(hotk->device, event, count); | ||
835 | acpi_bus_generate_netlink_event(hotk->device->pnp.device_class, | 838 | acpi_bus_generate_netlink_event(hotk->device->pnp.device_class, |
836 | dev_name(&hotk->device->dev), event, | 839 | dev_name(&hotk->device->dev), event, |
837 | hotk->event_count[event % 128]++); | 840 | count); |
838 | 841 | ||
839 | if (hotk->inputdev) { | 842 | if (hotk->inputdev) { |
840 | key = asus_get_entry_by_scancode(event); | 843 | key = asus_get_entry_by_scancode(event); |
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 786ed8661cb0..6f54fd1757cd 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -557,13 +557,17 @@ static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) | |||
557 | static void eeepc_hotk_notify(acpi_handle handle, u32 event, void *data) | 557 | static void eeepc_hotk_notify(acpi_handle handle, u32 event, void *data) |
558 | { | 558 | { |
559 | static struct key_entry *key; | 559 | static struct key_entry *key; |
560 | u16 count; | ||
561 | |||
560 | if (!ehotk) | 562 | if (!ehotk) |
561 | return; | 563 | return; |
562 | if (event >= NOTIFY_BRN_MIN && event <= NOTIFY_BRN_MAX) | 564 | if (event >= NOTIFY_BRN_MIN && event <= NOTIFY_BRN_MAX) |
563 | notify_brn(); | 565 | notify_brn(); |
566 | count = ehotk->event_count[event % 128]++; | ||
567 | acpi_bus_generate_proc_event(ehotk->device, event, count); | ||
564 | acpi_bus_generate_netlink_event(ehotk->device->pnp.device_class, | 568 | acpi_bus_generate_netlink_event(ehotk->device->pnp.device_class, |
565 | dev_name(&ehotk->device->dev), event, | 569 | dev_name(&ehotk->device->dev), event, |
566 | ehotk->event_count[event % 128]++); | 570 | count); |
567 | if (ehotk->inputdev) { | 571 | if (ehotk->inputdev) { |
568 | key = eepc_get_entry_by_scancode(event); | 572 | key = eepc_get_entry_by_scancode(event); |
569 | if (key) { | 573 | if (key) { |
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index bcbc05107ba8..d2433204a40c 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -7532,7 +7532,7 @@ MODULE_ALIAS(TPACPI_DRVR_SHORTNAME); | |||
7532 | * if it is not there yet. | 7532 | * if it is not there yet. |
7533 | */ | 7533 | */ |
7534 | #define IBM_BIOS_MODULE_ALIAS(__type) \ | 7534 | #define IBM_BIOS_MODULE_ALIAS(__type) \ |
7535 | MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW") | 7535 | MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW*") |
7536 | 7536 | ||
7537 | /* Non-ancient thinkpads */ | 7537 | /* Non-ancient thinkpads */ |
7538 | MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*"); | 7538 | MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*"); |
@@ -7541,9 +7541,9 @@ MODULE_ALIAS("dmi:bvnLENOVO:*:svnLENOVO:*:pvrThinkPad*:rvnLENOVO:*"); | |||
7541 | /* Ancient thinkpad BIOSes have to be identified by | 7541 | /* Ancient thinkpad BIOSes have to be identified by |
7542 | * BIOS type or model number, and there are far less | 7542 | * BIOS type or model number, and there are far less |
7543 | * BIOS types than model numbers... */ | 7543 | * BIOS types than model numbers... */ |
7544 | IBM_BIOS_MODULE_ALIAS("I[B,D,H,I,M,N,O,T,W,V,Y,Z]"); | 7544 | IBM_BIOS_MODULE_ALIAS("I[BDHIMNOTWVYZ]"); |
7545 | IBM_BIOS_MODULE_ALIAS("1[0,3,6,8,A-G,I,K,M-P,S,T]"); | 7545 | IBM_BIOS_MODULE_ALIAS("1[0368A-GIKM-PST]"); |
7546 | IBM_BIOS_MODULE_ALIAS("K[U,X-Z]"); | 7546 | IBM_BIOS_MODULE_ALIAS("K[UX-Z]"); |
7547 | 7547 | ||
7548 | MODULE_AUTHOR("Borislav Deianov, Henrique de Moraes Holschuh"); | 7548 | MODULE_AUTHOR("Borislav Deianov, Henrique de Moraes Holschuh"); |
7549 | MODULE_DESCRIPTION(TPACPI_DESC); | 7549 | MODULE_DESCRIPTION(TPACPI_DESC); |
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 8a8b377712c9..2f269e117b8f 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c | |||
@@ -708,7 +708,7 @@ static int __init acpi_wmi_add(struct acpi_device *device) | |||
708 | 708 | ||
709 | static int __init acpi_wmi_init(void) | 709 | static int __init acpi_wmi_init(void) |
710 | { | 710 | { |
711 | acpi_status result; | 711 | int result; |
712 | 712 | ||
713 | INIT_LIST_HEAD(&wmi_blocks.list); | 713 | INIT_LIST_HEAD(&wmi_blocks.list); |
714 | 714 | ||