linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch]workaround suspend bug for ACPI IDE
@ 2008-01-10  1:26 Shaohua Li
  2008-01-10 21:55 ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 2+ messages in thread
From: Shaohua Li @ 2008-01-10  1:26 UTC (permalink / raw)
  To: linux-ide; +Cc: bzolnier, Rafael J. Wysocki

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.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
 drivers/ide/ide-acpi.c |   22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

Index: linux/drivers/ide/ide-acpi.c
===================================================================
--- linux.orig/drivers/ide/ide-acpi.c	2008-01-07 10:13:28.000000000 +0800
+++ linux/drivers/ide/ide-acpi.c	2008-01-08 09:10:48.000000000 +0800
@@ -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,31 @@ 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 struct dmi_system_id ide_acpi_dmi_table[] = {
+	/* Bug 9673. We should check if this is because ACPI NVS isn't save/restored */
+	{no_acpi_psx, "HP nx9005",{
+	 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies Ltd."),
+	 DMI_MATCH(DMI_BIOS_VERSION, "KAM1.60")},NULL},
+};
+
+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 +649,7 @@ void ide_acpi_set_state(ide_hwif_t *hwif
 {
 	int unit;
 
-	if (ide_noacpi)
+	if (ide_noacpi || ide_noacpi_psx)
 		return;
 
 	DEBPRINT("ENTER:\n");
@@ -668,6 +694,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;



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch]workaround suspend bug for ACPI IDE
  2008-01-10  1:26 [patch]workaround suspend bug for ACPI IDE Shaohua Li
@ 2008-01-10 21:55 ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-01-10 21:55 UTC (permalink / raw)
  To: Shaohua Li; +Cc: linux-ide, Rafael J. Wysocki

On Thursday 10 January 2008, Shaohua Li wrote:
> 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.
> 
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>

applied, I did three minor changes while at it:

* fixed some scripts/checkpatch.pl complaints
* const-ified ide_acpi_dmi_table[]
* credited Mikko using 'Reported-by:' tag

Thanks,
Bart

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-10 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-10  1:26 [patch]workaround suspend bug for ACPI IDE Shaohua Li
2008-01-10 21:55 ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).