diff options
author | Shaohua Li <shaohua.li@intel.com> | 2008-01-10 17:03:42 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-10 17:03:42 -0500 |
commit | 90494893b5d2bf7533fb65accbfd8cbd6b51b9c3 (patch) | |
tree | c4c4d67a4c1d2bb1fd5e6630b5d25e6f33507a5a /drivers | |
parent | fd0b45dfd1858c6b49d06355a460bcf36d654c06 (diff) |
ide: workaround suspend bug for ACPI IDE
http://bugzilla.kernel.org/show_bug.cgi?id=9673
ACPI _PS3 cause S4 breaks in the second attempt. The system has a _PS3
method for IDE, which will call into SMM mode. Currently we haven't clue
why just the second attempt fails, as it's totally in BIOS code, so
blacklist the system so far for 2.6.24.
A possible suspect is ACPI NVS isn't save/restore, we will revisit the
bug after linux does ACPI NVS save/restore.
Bart:
- fix scripts/checkpatch.pl complaints
- const-ify ide_acpi_dmi_table[]
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Reported-by: Mikko Vinni <mmvinni@yahoo.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/ide-acpi.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index 89df48fdc69d..fe6768a7d658 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <acpi/acpi.h> | 16 | #include <acpi/acpi.h> |
17 | #include <linux/ide.h> | 17 | #include <linux/ide.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/dmi.h> | ||
19 | 20 | ||
20 | #include <acpi/acpi_bus.h> | 21 | #include <acpi/acpi_bus.h> |
21 | #include <acpi/acnames.h> | 22 | #include <acpi/acnames.h> |
@@ -65,6 +66,37 @@ extern int ide_noacpi; | |||
65 | extern int ide_noacpitfs; | 66 | extern int ide_noacpitfs; |
66 | extern int ide_noacpionboot; | 67 | extern int ide_noacpionboot; |
67 | 68 | ||
69 | static bool ide_noacpi_psx; | ||
70 | static int no_acpi_psx(const struct dmi_system_id *id) | ||
71 | { | ||
72 | ide_noacpi_psx = true; | ||
73 | printk(KERN_NOTICE"%s detected - disable ACPI _PSx.\n", id->ident); | ||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | static const struct dmi_system_id ide_acpi_dmi_table[] = { | ||
78 | /* Bug 9673. */ | ||
79 | /* We should check if this is because ACPI NVS isn't save/restored. */ | ||
80 | { | ||
81 | .callback = no_acpi_psx, | ||
82 | .ident = "HP nx9005", | ||
83 | .matches = { | ||
84 | DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies Ltd."), | ||
85 | DMI_MATCH(DMI_BIOS_VERSION, "KAM1.60") | ||
86 | }, | ||
87 | }, | ||
88 | }; | ||
89 | |||
90 | static int ide_acpi_blacklist(void) | ||
91 | { | ||
92 | static int done; | ||
93 | if (done) | ||
94 | return 0; | ||
95 | done = 1; | ||
96 | dmi_check_system(ide_acpi_dmi_table); | ||
97 | return 0; | ||
98 | } | ||
99 | |||
68 | /** | 100 | /** |
69 | * ide_get_dev_handle - finds acpi_handle and PCI device.function | 101 | * ide_get_dev_handle - finds acpi_handle and PCI device.function |
70 | * @dev: device to locate | 102 | * @dev: device to locate |
@@ -623,7 +655,7 @@ void ide_acpi_set_state(ide_hwif_t *hwif, int on) | |||
623 | { | 655 | { |
624 | int unit; | 656 | int unit; |
625 | 657 | ||
626 | if (ide_noacpi) | 658 | if (ide_noacpi || ide_noacpi_psx) |
627 | return; | 659 | return; |
628 | 660 | ||
629 | DEBPRINT("ENTER:\n"); | 661 | DEBPRINT("ENTER:\n"); |
@@ -668,6 +700,8 @@ void ide_acpi_init(ide_hwif_t *hwif) | |||
668 | struct ide_acpi_drive_link *master; | 700 | struct ide_acpi_drive_link *master; |
669 | struct ide_acpi_drive_link *slave; | 701 | struct ide_acpi_drive_link *slave; |
670 | 702 | ||
703 | ide_acpi_blacklist(); | ||
704 | |||
671 | hwif->acpidata = kzalloc(sizeof(struct ide_acpi_hwif_link), GFP_KERNEL); | 705 | hwif->acpidata = kzalloc(sizeof(struct ide_acpi_hwif_link), GFP_KERNEL); |
672 | if (!hwif->acpidata) | 706 | if (!hwif->acpidata) |
673 | return; | 707 | return; |