public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 1/11]avoid check _STA method
@ 2008-08-27  3:14 Shaohua Li
  2008-08-27  7:53 ` Andi Kleen
  0 siblings, 1 reply; 14+ messages in thread
From: Shaohua Li @ 2008-08-27  3:14 UTC (permalink / raw)
  To: linux acpi
  Cc: Len Brown, Andi Kleen, Henrique de Moraes Holschuh, Holger Macht,
	mjg59, Tejun Heo

In some BIOSes, every _STA method call will send a notification again,
this cause freeze. And in some BIOSes, it appears _STA should be called
after _DCK. This tries to avoid calls _STA, and still keep the device
present check.
http://bugzilla.kernel.org/show_bug.cgi?id=10431

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

Index: linux/drivers/acpi/dock.c
===================================================================
--- linux.orig/drivers/acpi/dock.c	2008-08-27 10:19:17.000000000 +0800
+++ linux/drivers/acpi/dock.c	2008-08-27 10:19:30.000000000 +0800
@@ -604,14 +604,16 @@ static int handle_eject_request(struct d
 static void dock_notify(acpi_handle handle, u32 event, void *data)
 {
 	struct dock_station *ds = data;
+	struct acpi_device *tmp;
 
 	switch (event) {
 	case ACPI_NOTIFY_BUS_CHECK:
-		if (!dock_in_progress(ds) && dock_present(ds)) {
+		if (!dock_in_progress(ds) && acpi_bus_get_device(ds->handle, &tmp)) {
 			begin_dock(ds);
 			dock(ds);
 			if (!dock_present(ds)) {
 				printk(KERN_ERR PREFIX "Unable to dock!\n");
+				complete_dock(ds);
 				break;
 			}
 			atomic_notifier_call_chain(&dock_notifier_list,


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [patch 1/11]avoid check _STA method
@ 2008-08-28  2:02 Shaohua Li
  2008-08-29 15:19 ` Thomas Renninger
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Shaohua Li @ 2008-08-28  2:02 UTC (permalink / raw)
  To: linux acpi
  Cc: Len Brown, Andi Kleen, Henrique de Moraes Holschuh, Holger Macht,
	mjg59, Tejun Heo

In some BIOSes, every _STA method call will send a notification again,
this cause freeze. And in some BIOSes, it appears _STA should be called
after _DCK. This tries to avoid calls _STA, and still keep the device
present check.
http://bugzilla.kernel.org/show_bug.cgi?id=10431

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

Index: linux/drivers/acpi/dock.c
===================================================================
--- linux.orig/drivers/acpi/dock.c	2008-08-27 14:38:44.000000000 +0800
+++ linux/drivers/acpi/dock.c	2008-08-28 09:33:02.000000000 +0800
@@ -604,14 +604,17 @@ static int handle_eject_request(struct d
 static void dock_notify(acpi_handle handle, u32 event, void *data)
 {
 	struct dock_station *ds = data;
+	struct acpi_device *tmp;
 
 	switch (event) {
 	case ACPI_NOTIFY_BUS_CHECK:
-		if (!dock_in_progress(ds) && dock_present(ds)) {
+		if (!dock_in_progress(ds) && acpi_bus_get_device(ds->handle,
+		   &tmp)) {
 			begin_dock(ds);
 			dock(ds);
 			if (!dock_present(ds)) {
 				printk(KERN_ERR PREFIX "Unable to dock!\n");
+				complete_dock(ds);
 				break;
 			}
 			atomic_notifier_call_chain(&dock_notifier_list,



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

end of thread, other threads:[~2008-11-11 12:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-27  3:14 [patch 1/11]avoid check _STA method Shaohua Li
2008-08-27  7:53 ` Andi Kleen
2008-08-27  8:24   ` Li, Shaohua
2008-08-27  8:56     ` Andi Kleen
2008-08-27  8:57       ` Alan Jenkins
  -- strict thread matches above, loose matches on Subject: below --
2008-08-28  2:02 Shaohua Li
2008-08-29 15:19 ` Thomas Renninger
2008-09-22 10:57 ` Holger Macht
2008-09-24  2:51   ` Shaohua Li
2008-09-24 12:17     ` Holger Macht
2008-09-25 14:49     ` Holger Macht
2008-09-26  1:04       ` Shaohua Li
2008-11-11 12:17         ` Holger Macht
2008-09-24  3:38 ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox