Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=90494893b5d2bf7533fb65accbfd8cbd6b51b9c3
Commit:     90494893b5d2bf7533fb65accbfd8cbd6b51b9c3
Parent:     fd0b45dfd1858c6b49d06355a460bcf36d654c06
Author:     Shaohua Li <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 10 23:03:42 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Thu Jan 10 23:03:42 2008 +0100

    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 <[EMAIL PROTECTED]>
    Cc: "Rafael J. Wysocki" <[EMAIL PROTECTED]>
    Reported-by: Mikko Vinni <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 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 89df48f..fe6768a 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -16,6 +16,7 @@
 #include <acpi/acpi.h>
 #include <linux/ide.h>
 #include <linux/pci.h>
+#include <linux/dmi.h>
 
 #include <acpi/acpi_bus.h>
 #include <acpi/acnames.h>
@@ -65,6 +66,37 @@ extern int ide_noacpi;
 extern int ide_noacpitfs;
 extern int ide_noacpionboot;
 
+static bool ide_noacpi_psx;
+static int no_acpi_psx(const struct dmi_system_id *id)
+{
+       ide_noacpi_psx = true;
+       printk(KERN_NOTICE"%s detected - disable ACPI _PSx.\n", id->ident);
+       return 0;
+}
+
+static const struct dmi_system_id ide_acpi_dmi_table[] = {
+       /* Bug 9673. */
+       /* We should check if this is because ACPI NVS isn't save/restored. */
+       {
+               .callback = no_acpi_psx,
+               .ident    = "HP nx9005",
+               .matches  = {
+                       DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies Ltd."),
+                       DMI_MATCH(DMI_BIOS_VERSION, "KAM1.60")
+               },
+       },
+};
+
+static int ide_acpi_blacklist(void)
+{
+       static int done;
+       if (done)
+               return 0;
+       done = 1;
+       dmi_check_system(ide_acpi_dmi_table);
+       return 0;
+}
+
 /**
  * ide_get_dev_handle - finds acpi_handle and PCI device.function
  * @dev: device to locate
@@ -623,7 +655,7 @@ void ide_acpi_set_state(ide_hwif_t *hwif, int on)
 {
        int unit;
 
-       if (ide_noacpi)
+       if (ide_noacpi || ide_noacpi_psx)
                return;
 
        DEBPRINT("ENTER:\n");
@@ -668,6 +700,8 @@ void ide_acpi_init(ide_hwif_t *hwif)
        struct ide_acpi_drive_link      *master;
        struct ide_acpi_drive_link      *slave;
 
+       ide_acpi_blacklist();
+
        hwif->acpidata = kzalloc(sizeof(struct ide_acpi_hwif_link), GFP_KERNEL);
        if (!hwif->acpidata)
                return;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to