diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-26 19:29:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-26 19:29:12 -0400 |
commit | 7eea5b897eb6bbb79d7e6e398f4fbb61fcee57c7 (patch) | |
tree | b06a8cbd9e64078dcece93ba9eb3669727c13277 /drivers | |
parent | 0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (diff) | |
parent | 9fb3c5ca3dabe06758c35f790c68e273ed749e19 (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:
leds-hp-disk: fix build warning
ACPI: Oops in ACPI with git latest
ACPI suspend: build fix for ACPI_SLEEP=n && XEN_SAVE_RESTORE=y.
toshiba_acpi: always call input_sync() after input_report_switch()
ACPI: Always report a sync event after a lid state change
ACPI: cpufreq, processor: fix compile error in drivers/acpi/processor_perflib.c
i7300_idle: Fix compile warning CONFIG_I7300_IDLE_IOAT_CHANNEL not defined
i7300_idle: Cleanup based review comments
i7300_idle: Disable ioat channel only on platforms where ile driver can load
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/button.c | 3 | ||||
-rw-r--r-- | drivers/acpi/processor_perflib.c | 5 | ||||
-rw-r--r-- | drivers/acpi/sleep/main.c | 2 | ||||
-rw-r--r-- | drivers/acpi/toshiba_acpi.c | 2 | ||||
-rw-r--r-- | drivers/dma/ioat_dma.c | 7 | ||||
-rw-r--r-- | drivers/idle/Kconfig | 11 | ||||
-rw-r--r-- | drivers/idle/i7300_idle.c | 105 | ||||
-rw-r--r-- | drivers/leds/leds-hp-disk.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci-acpi.c | 3 |
9 files changed, 46 insertions, 94 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 9d568d417eaa..cb046c3fc3f2 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -262,6 +262,7 @@ static int acpi_lid_send_state(struct acpi_button *button) | |||
262 | return -ENODEV; | 262 | return -ENODEV; |
263 | /* input layer checks if event is redundant */ | 263 | /* input layer checks if event is redundant */ |
264 | input_report_switch(button->input, SW_LID, !state); | 264 | input_report_switch(button->input, SW_LID, !state); |
265 | input_sync(button->input); | ||
265 | return 0; | 266 | return 0; |
266 | } | 267 | } |
267 | 268 | ||
@@ -285,8 +286,8 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data) | |||
285 | input_report_key(input, keycode, 1); | 286 | input_report_key(input, keycode, 1); |
286 | input_sync(input); | 287 | input_sync(input); |
287 | input_report_key(input, keycode, 0); | 288 | input_report_key(input, keycode, 0); |
289 | input_sync(input); | ||
288 | } | 290 | } |
289 | input_sync(input); | ||
290 | 291 | ||
291 | acpi_bus_generate_proc_event(button->device, event, | 292 | acpi_bus_generate_proc_event(button->device, event, |
292 | ++button->pushed); | 293 | ++button->pushed); |
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index dc98f7a6f2c4..dbcf260ea93f 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c | |||
@@ -38,7 +38,10 @@ | |||
38 | 38 | ||
39 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
40 | #endif | 40 | #endif |
41 | |||
42 | #ifdef CONFIG_X86 | ||
41 | #include <asm/cpufeature.h> | 43 | #include <asm/cpufeature.h> |
44 | #endif | ||
42 | 45 | ||
43 | #include <acpi/acpi_bus.h> | 46 | #include <acpi/acpi_bus.h> |
44 | #include <acpi/processor.h> | 47 | #include <acpi/processor.h> |
@@ -360,11 +363,13 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr) | |||
360 | * the BIOS is older than the CPU and does not know its frequencies | 363 | * the BIOS is older than the CPU and does not know its frequencies |
361 | */ | 364 | */ |
362 | update_bios: | 365 | update_bios: |
366 | #ifdef CONFIG_X86 | ||
363 | if (ACPI_SUCCESS(acpi_get_handle(pr->handle, "_PPC", &handle))){ | 367 | if (ACPI_SUCCESS(acpi_get_handle(pr->handle, "_PPC", &handle))){ |
364 | if(boot_cpu_has(X86_FEATURE_EST)) | 368 | if(boot_cpu_has(X86_FEATURE_EST)) |
365 | printk(KERN_WARNING FW_BUG "BIOS needs update for CPU " | 369 | printk(KERN_WARNING FW_BUG "BIOS needs update for CPU " |
366 | "frequency support\n"); | 370 | "frequency support\n"); |
367 | } | 371 | } |
372 | #endif | ||
368 | return result; | 373 | return result; |
369 | } | 374 | } |
370 | 375 | ||
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 26571bafb158..80c0868d0480 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -163,6 +163,8 @@ static void acpi_pm_end(void) | |||
163 | acpi_target_sleep_state = ACPI_STATE_S0; | 163 | acpi_target_sleep_state = ACPI_STATE_S0; |
164 | acpi_sleep_tts_switch(acpi_target_sleep_state); | 164 | acpi_sleep_tts_switch(acpi_target_sleep_state); |
165 | } | 165 | } |
166 | #else /* !CONFIG_ACPI_SLEEP */ | ||
167 | #define acpi_target_sleep_state ACPI_STATE_S0 | ||
166 | #endif /* CONFIG_ACPI_SLEEP */ | 168 | #endif /* CONFIG_ACPI_SLEEP */ |
167 | 169 | ||
168 | #ifdef CONFIG_SUSPEND | 170 | #ifdef CONFIG_SUSPEND |
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index 2a632f8b7a05..66aac06f2ac5 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c | |||
@@ -371,6 +371,7 @@ static void bt_poll_rfkill(struct input_polled_dev *poll_dev) | |||
371 | RFKILL_STATE_HARD_BLOCKED); | 371 | RFKILL_STATE_HARD_BLOCKED); |
372 | input_report_switch(poll_dev->input, SW_RFKILL_ALL, | 372 | input_report_switch(poll_dev->input, SW_RFKILL_ALL, |
373 | new_rfk_state); | 373 | new_rfk_state); |
374 | input_sync(poll_dev->input); | ||
374 | } | 375 | } |
375 | } | 376 | } |
376 | 377 | ||
@@ -842,6 +843,7 @@ static int __init toshiba_acpi_init(void) | |||
842 | set_bit(EV_SW, toshiba_acpi.poll_dev->input->evbit); | 843 | set_bit(EV_SW, toshiba_acpi.poll_dev->input->evbit); |
843 | set_bit(SW_RFKILL_ALL, toshiba_acpi.poll_dev->input->swbit); | 844 | set_bit(SW_RFKILL_ALL, toshiba_acpi.poll_dev->input->swbit); |
844 | input_report_switch(toshiba_acpi.poll_dev->input, SW_RFKILL_ALL, TRUE); | 845 | input_report_switch(toshiba_acpi.poll_dev->input, SW_RFKILL_ALL, TRUE); |
846 | input_sync(toshiba_acpi.poll_dev->input); | ||
845 | 847 | ||
846 | ret = input_register_polled_device(toshiba_acpi.poll_dev); | 848 | ret = input_register_polled_device(toshiba_acpi.poll_dev); |
847 | if (ret) { | 849 | if (ret) { |
diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c index 43b8cefad2c6..b0438c4f0c30 100644 --- a/drivers/dma/ioat_dma.c +++ b/drivers/dma/ioat_dma.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
34 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
35 | #include <linux/workqueue.h> | 35 | #include <linux/workqueue.h> |
36 | #include <linux/i7300_idle.h> | ||
36 | #include "ioatdma.h" | 37 | #include "ioatdma.h" |
37 | #include "ioatdma_registers.h" | 38 | #include "ioatdma_registers.h" |
38 | #include "ioatdma_hw.h" | 39 | #include "ioatdma_hw.h" |
@@ -171,8 +172,10 @@ static int ioat_dma_enumerate_channels(struct ioatdma_device *device) | |||
171 | xfercap_scale = readb(device->reg_base + IOAT_XFERCAP_OFFSET); | 172 | xfercap_scale = readb(device->reg_base + IOAT_XFERCAP_OFFSET); |
172 | xfercap = (xfercap_scale == 0 ? -1 : (1UL << xfercap_scale)); | 173 | xfercap = (xfercap_scale == 0 ? -1 : (1UL << xfercap_scale)); |
173 | 174 | ||
174 | #if CONFIG_I7300_IDLE_IOAT_CHANNEL | 175 | #ifdef CONFIG_I7300_IDLE_IOAT_CHANNEL |
175 | device->common.chancnt--; | 176 | if (i7300_idle_platform_probe(NULL, NULL) == 0) { |
177 | device->common.chancnt--; | ||
178 | } | ||
176 | #endif | 179 | #endif |
177 | for (i = 0; i < device->common.chancnt; i++) { | 180 | for (i = 0; i < device->common.chancnt; i++) { |
178 | ioat_chan = kzalloc(sizeof(*ioat_chan), GFP_KERNEL); | 181 | ioat_chan = kzalloc(sizeof(*ioat_chan), GFP_KERNEL); |
diff --git a/drivers/idle/Kconfig b/drivers/idle/Kconfig index f5b26dd579e4..108264de0ac9 100644 --- a/drivers/idle/Kconfig +++ b/drivers/idle/Kconfig | |||
@@ -5,12 +5,13 @@ config I7300_IDLE_IOAT_CHANNEL | |||
5 | bool | 5 | bool |
6 | 6 | ||
7 | config I7300_IDLE | 7 | config I7300_IDLE |
8 | tristate "Intel chipset idle power saving driver" | 8 | tristate "Intel chipset idle memory power saving driver" |
9 | select I7300_IDLE_IOAT_CHANNEL | 9 | select I7300_IDLE_IOAT_CHANNEL |
10 | depends on X86_64 | 10 | depends on X86_64 && EXPERIMENTAL |
11 | help | 11 | help |
12 | Enable idle power savings with certain Intel server chipsets. | 12 | Enable memory power savings when idle with certain Intel server |
13 | The chipset must have I/O AT support, such as the Intel 7300. | 13 | chipsets. The chipset must have I/O AT support, such as the |
14 | The power savings depends on the type and quantity of DRAM devices. | 14 | Intel 7300. The power savings depends on the type and quantity of |
15 | DRAM devices. | ||
15 | 16 | ||
16 | endmenu | 17 | endmenu |
diff --git a/drivers/idle/i7300_idle.c b/drivers/idle/i7300_idle.c index 59d1bbc3cd3c..fb176f6ef9f8 100644 --- a/drivers/idle/i7300_idle.c +++ b/drivers/idle/i7300_idle.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/debugfs.h> | 26 | #include <linux/debugfs.h> |
27 | #include <linux/stop_machine.h> | 27 | #include <linux/stop_machine.h> |
28 | #include <linux/i7300_idle.h> | ||
28 | 29 | ||
29 | #include <asm/idle.h> | 30 | #include <asm/idle.h> |
30 | 31 | ||
@@ -34,6 +35,8 @@ | |||
34 | #define I7300_IDLE_DRIVER_VERSION "1.55" | 35 | #define I7300_IDLE_DRIVER_VERSION "1.55" |
35 | #define I7300_PRINT "i7300_idle:" | 36 | #define I7300_PRINT "i7300_idle:" |
36 | 37 | ||
38 | #define MAX_STOP_RETRIES 10 | ||
39 | |||
37 | static int debug; | 40 | static int debug; |
38 | module_param_named(debug, debug, uint, 0644); | 41 | module_param_named(debug, debug, uint, 0644); |
39 | MODULE_PARM_DESC(debug, "Enable debug printks in this driver"); | 42 | MODULE_PARM_DESC(debug, "Enable debug printks in this driver"); |
@@ -46,12 +49,12 @@ MODULE_PARM_DESC(debug, "Enable debug printks in this driver"); | |||
46 | * 0 = No throttling | 49 | * 0 = No throttling |
47 | * 1 = Throttle when > 4 activations per eval window (Maximum throttling) | 50 | * 1 = Throttle when > 4 activations per eval window (Maximum throttling) |
48 | * 2 = Throttle when > 8 activations | 51 | * 2 = Throttle when > 8 activations |
49 | * 168 = Throttle when > 168 activations (Minimum throttling) | 52 | * 168 = Throttle when > 672 activations (Minimum throttling) |
50 | */ | 53 | */ |
51 | #define MAX_THRTLWLIMIT 168 | 54 | #define MAX_THROTTLE_LOW_LIMIT 168 |
52 | static uint i7300_idle_thrtlowlm = 1; | 55 | static uint throttle_low_limit = 1; |
53 | module_param_named(thrtlwlimit, i7300_idle_thrtlowlm, uint, 0644); | 56 | module_param_named(throttle_low_limit, throttle_low_limit, uint, 0644); |
54 | MODULE_PARM_DESC(thrtlwlimit, | 57 | MODULE_PARM_DESC(throttle_low_limit, |
55 | "Value for THRTLOWLM activation field " | 58 | "Value for THRTLOWLM activation field " |
56 | "(0 = disable throttle, 1 = Max throttle, 168 = Min throttle)"); | 59 | "(0 = disable throttle, 1 = Max throttle, 168 = Min throttle)"); |
57 | 60 | ||
@@ -110,9 +113,9 @@ static int i7300_idle_ioat_start(void) | |||
110 | static void i7300_idle_ioat_stop(void) | 113 | static void i7300_idle_ioat_stop(void) |
111 | { | 114 | { |
112 | int i; | 115 | int i; |
113 | u8 sts; | 116 | u64 sts; |
114 | 117 | ||
115 | for (i = 0; i < 5; i++) { | 118 | for (i = 0; i < MAX_STOP_RETRIES; i++) { |
116 | writeb(IOAT_CHANCMD_RESET, | 119 | writeb(IOAT_CHANCMD_RESET, |
117 | ioat_chanbase + IOAT1_CHANCMD_OFFSET); | 120 | ioat_chanbase + IOAT1_CHANCMD_OFFSET); |
118 | 121 | ||
@@ -126,9 +129,10 @@ static void i7300_idle_ioat_stop(void) | |||
126 | 129 | ||
127 | } | 130 | } |
128 | 131 | ||
129 | if (i == 5) | 132 | if (i == MAX_STOP_RETRIES) { |
130 | dprintk("failed to suspend+reset I/O AT after 5 retries\n"); | 133 | dprintk("failed to stop I/O AT after %d retries\n", |
131 | 134 | MAX_STOP_RETRIES); | |
135 | } | ||
132 | } | 136 | } |
133 | 137 | ||
134 | /* Test I/O AT by copying 1024 byte from 2k to 1k */ | 138 | /* Test I/O AT by copying 1024 byte from 2k to 1k */ |
@@ -275,7 +279,7 @@ static void __exit i7300_idle_ioat_exit(void) | |||
275 | i7300_idle_ioat_stop(); | 279 | i7300_idle_ioat_stop(); |
276 | 280 | ||
277 | /* Wait for a while for the channel to halt before releasing */ | 281 | /* Wait for a while for the channel to halt before releasing */ |
278 | for (i = 0; i < 10; i++) { | 282 | for (i = 0; i < MAX_STOP_RETRIES; i++) { |
279 | writeb(IOAT_CHANCMD_RESET, | 283 | writeb(IOAT_CHANCMD_RESET, |
280 | ioat_chanbase + IOAT1_CHANCMD_OFFSET); | 284 | ioat_chanbase + IOAT1_CHANCMD_OFFSET); |
281 | 285 | ||
@@ -389,9 +393,9 @@ static void i7300_idle_start(void) | |||
389 | new_ctl = i7300_idle_thrtctl_saved & ~DIMM_THRTCTL_THRMHUNT; | 393 | new_ctl = i7300_idle_thrtctl_saved & ~DIMM_THRTCTL_THRMHUNT; |
390 | pci_write_config_byte(fbd_dev, DIMM_THRTCTL, new_ctl); | 394 | pci_write_config_byte(fbd_dev, DIMM_THRTCTL, new_ctl); |
391 | 395 | ||
392 | limit = i7300_idle_thrtlowlm; | 396 | limit = throttle_low_limit; |
393 | if (unlikely(limit > MAX_THRTLWLIMIT)) | 397 | if (unlikely(limit > MAX_THROTTLE_LOW_LIMIT)) |
394 | limit = MAX_THRTLWLIMIT; | 398 | limit = MAX_THROTTLE_LOW_LIMIT; |
395 | 399 | ||
396 | pci_write_config_byte(fbd_dev, DIMM_THRTLOW, limit); | 400 | pci_write_config_byte(fbd_dev, DIMM_THRTLOW, limit); |
397 | 401 | ||
@@ -440,7 +444,7 @@ static int i7300_idle_notifier(struct notifier_block *nb, unsigned long val, | |||
440 | static ktime_t idle_begin_time; | 444 | static ktime_t idle_begin_time; |
441 | static int time_init = 1; | 445 | static int time_init = 1; |
442 | 446 | ||
443 | if (!i7300_idle_thrtlowlm) | 447 | if (!throttle_low_limit) |
444 | return 0; | 448 | return 0; |
445 | 449 | ||
446 | if (unlikely(time_init)) { | 450 | if (unlikely(time_init)) { |
@@ -505,77 +509,8 @@ static struct notifier_block i7300_idle_nb = { | |||
505 | .notifier_call = i7300_idle_notifier, | 509 | .notifier_call = i7300_idle_notifier, |
506 | }; | 510 | }; |
507 | 511 | ||
508 | /* | ||
509 | * I/O AT controls (PCI bus 0 device 8 function 0) | ||
510 | * DIMM controls (PCI bus 0 device 16 function 1) | ||
511 | */ | ||
512 | #define IOAT_BUS 0 | ||
513 | #define IOAT_DEVFN PCI_DEVFN(8, 0) | ||
514 | #define MEMCTL_BUS 0 | ||
515 | #define MEMCTL_DEVFN PCI_DEVFN(16, 1) | ||
516 | |||
517 | struct fbd_ioat { | ||
518 | unsigned int vendor; | ||
519 | unsigned int ioat_dev; | ||
520 | }; | ||
521 | |||
522 | /* | ||
523 | * The i5000 chip-set has the same hooks as the i7300 | ||
524 | * but support is disabled by default because this driver | ||
525 | * has not been validated on that platform. | ||
526 | */ | ||
527 | #define SUPPORT_I5000 0 | ||
528 | |||
529 | static const struct fbd_ioat fbd_ioat_list[] = { | ||
530 | {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT_CNB}, | ||
531 | #if SUPPORT_I5000 | ||
532 | {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT}, | ||
533 | #endif | ||
534 | {0, 0} | ||
535 | }; | ||
536 | |||
537 | /* table of devices that work with this driver */ | ||
538 | static const struct pci_device_id pci_tbl[] = { | ||
539 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_FBD_CNB) }, | ||
540 | #if SUPPORT_I5000 | ||
541 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) }, | ||
542 | #endif | ||
543 | { } /* Terminating entry */ | ||
544 | }; | ||
545 | |||
546 | MODULE_DEVICE_TABLE(pci, pci_tbl); | 512 | MODULE_DEVICE_TABLE(pci, pci_tbl); |
547 | 513 | ||
548 | /* Check for known platforms with I/O-AT */ | ||
549 | static int __init i7300_idle_platform_probe(void) | ||
550 | { | ||
551 | int i; | ||
552 | |||
553 | fbd_dev = pci_get_bus_and_slot(MEMCTL_BUS, MEMCTL_DEVFN); | ||
554 | if (!fbd_dev) | ||
555 | return -ENODEV; | ||
556 | |||
557 | for (i = 0; pci_tbl[i].vendor != 0; i++) { | ||
558 | if (fbd_dev->vendor == pci_tbl[i].vendor && | ||
559 | fbd_dev->device == pci_tbl[i].device) { | ||
560 | break; | ||
561 | } | ||
562 | } | ||
563 | if (pci_tbl[i].vendor == 0) | ||
564 | return -ENODEV; | ||
565 | |||
566 | ioat_dev = pci_get_bus_and_slot(IOAT_BUS, IOAT_DEVFN); | ||
567 | if (!ioat_dev) | ||
568 | return -ENODEV; | ||
569 | |||
570 | for (i = 0; fbd_ioat_list[i].vendor != 0; i++) { | ||
571 | if (ioat_dev->vendor == fbd_ioat_list[i].vendor && | ||
572 | ioat_dev->device == fbd_ioat_list[i].ioat_dev) { | ||
573 | return 0; | ||
574 | } | ||
575 | } | ||
576 | return -ENODEV; | ||
577 | } | ||
578 | |||
579 | int stats_open_generic(struct inode *inode, struct file *fp) | 514 | int stats_open_generic(struct inode *inode, struct file *fp) |
580 | { | 515 | { |
581 | fp->private_data = inode->i_private; | 516 | fp->private_data = inode->i_private; |
@@ -617,7 +552,7 @@ static int __init i7300_idle_init(void) | |||
617 | cpus_clear(idle_cpumask); | 552 | cpus_clear(idle_cpumask); |
618 | total_us = 0; | 553 | total_us = 0; |
619 | 554 | ||
620 | if (i7300_idle_platform_probe()) | 555 | if (i7300_idle_platform_probe(&fbd_dev, &ioat_dev)) |
621 | return -ENODEV; | 556 | return -ENODEV; |
622 | 557 | ||
623 | if (i7300_idle_thrt_save()) | 558 | if (i7300_idle_thrt_save()) |
diff --git a/drivers/leds/leds-hp-disk.c b/drivers/leds/leds-hp-disk.c index 53a25b1c2dae..74645ab15660 100644 --- a/drivers/leds/leds-hp-disk.c +++ b/drivers/leds/leds-hp-disk.c | |||
@@ -49,7 +49,7 @@ static struct acpi_hpled adev; | |||
49 | 49 | ||
50 | static acpi_status hpled_acpi_write(acpi_handle handle, int reg) | 50 | static acpi_status hpled_acpi_write(acpi_handle handle, int reg) |
51 | { | 51 | { |
52 | unsigned long ret; /* Not used when writing */ | 52 | unsigned long long ret; /* Not used when writing */ |
53 | union acpi_object in_obj[1]; | 53 | union acpi_object in_obj[1]; |
54 | struct acpi_object_list args = { 1, in_obj }; | 54 | struct acpi_object_list args = { 1, in_obj }; |
55 | 55 | ||
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index dfe7c8e1b185..b3a63edb6901 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -83,6 +83,9 @@ static acpi_status acpi_run_osc(acpi_handle handle, | |||
83 | if (ACPI_FAILURE(status)) | 83 | if (ACPI_FAILURE(status)) |
84 | return status; | 84 | return status; |
85 | 85 | ||
86 | if (!output.length) | ||
87 | return AE_NULL_OBJECT; | ||
88 | |||
86 | out_obj = output.pointer; | 89 | out_obj = output.pointer; |
87 | if (out_obj->type != ACPI_TYPE_BUFFER) { | 90 | if (out_obj->type != ACPI_TYPE_BUFFER) { |
88 | printk(KERN_DEBUG "Evaluate _OSC returns wrong type\n"); | 91 | printk(KERN_DEBUG "Evaluate _OSC returns wrong type\n"); |