public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix ACPI multible power entries
@ 2001-11-09 12:01 Anders Peter Fugmann
  0 siblings, 0 replies; 4+ messages in thread
From: Anders Peter Fugmann @ 2001-11-09 12:01 UTC (permalink / raw)
  To: andrew.grover; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

Hi.

In trying to get ACPI to work on my system, i was stumbled to see two 
button entries under /proc/acpi/button/.

Attached is a patch which corrects this behaviour.
The patch applies to 2.4.14.

Regards
Anders Fugmann



[-- Attachment #2: acpi.diff --]
[-- Type: text/plain, Size: 1223 bytes --]

--- linux-2.4.14/drivers/acpi/ospm/button/bn_osl.c.orig	Thu Nov  8 21:03:35 2001
+++ linux-2.4.14/drivers/acpi/ospm/button/bn_osl.c	Fri Nov  9 12:52:57 2001
@@ -97,10 +97,13 @@
 			printk(KERN_WARNING "ACPI: Multiple power buttons detected, ignoring fixed-feature\n");
 		default:
 			printk(KERN_INFO "ACPI: Power Button (CM) found\n");
-			bn_power_button = BN_TYPE_GENERIC;
-			if (!proc_mkdir(BN_PROC_POWER_BUTTON, bn_proc_root)) {
-				status = AE_ERROR;
+			/* Only create proc entry, if it has not been created before */
+			if (!bn_power_button) {
+			      if (!proc_mkdir(BN_PROC_POWER_BUTTON, bn_proc_root)) {
+			            status = AE_ERROR;
+			      }
 			}
+			bn_power_button = BN_TYPE_GENERIC;
 			break;
 		}
 		break;
@@ -130,9 +133,13 @@
 		default:
 			bn_sleep_button = BN_TYPE_GENERIC;
 			printk(KERN_INFO "ACPI: Sleep Button (CM) found\n");
-			if (!proc_mkdir(BN_PROC_SLEEP_BUTTON, bn_proc_root)) {
-				status = AE_ERROR;
+			/* Only create proc entry, if it has not been created before */
+			if (!bn_sleep_button) {
+			      if (!proc_mkdir(BN_PROC_SLEEP_BUTTON, bn_proc_root)) {
+				    status = AE_ERROR;
+			      }
 			}
+			bn_sleep_button = BN_TYPE_GENERIC;
 			break;
 		}
 		break;

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

* RE: [PATCH] fix ACPI multible power entries
@ 2001-11-09 19:10 Grover, Andrew
  2001-11-09 19:17 ` Matthew Dharm
  2001-11-10 10:20 ` Anders Peter Fugmann
  0 siblings, 2 replies; 4+ messages in thread
From: Grover, Andrew @ 2001-11-09 19:10 UTC (permalink / raw)
  To: 'Anders Peter Fugmann'; +Cc: linux-kernel

We should already be handling multiple power button definitions, so I'm
confused why you're still seeing the problem. Could you please send me your
dmesg output and /proc/acpi/dsdt output?

Thanks -- Regards -- Andy

> -----Original Message-----
> From: Anders Peter Fugmann [mailto:afu@fugmann.dhs.org]
> Sent: Friday, November 09, 2001 4:01 AM
> To: andrew.grover@intel.com
> Cc: linux-kernel@vger.kernel.org
> Subject: [PATCH] fix ACPI multible power entries
> Importance: High
> 
> 
> Hi.
> 
> In trying to get ACPI to work on my system, i was stumbled to see two 
> button entries under /proc/acpi/button/.
> 
> Attached is a patch which corrects this behaviour.
> The patch applies to 2.4.14.
> 
> Regards
> Anders Fugmann
> 
> 
> 

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

* Re: [PATCH] fix ACPI multible power entries
  2001-11-09 19:10 Grover, Andrew
@ 2001-11-09 19:17 ` Matthew Dharm
  2001-11-10 10:20 ` Anders Peter Fugmann
  1 sibling, 0 replies; 4+ messages in thread
From: Matthew Dharm @ 2001-11-09 19:17 UTC (permalink / raw)
  To: Grover, Andrew; +Cc: 'Anders Peter Fugmann', linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1813 bytes --]

I see this too on 2.4.14.  The boot messages indicate that one is
fixed-feature, whatever that means, and is being ignored.  But there are
still two entries in the /proc tree.

I'm also getting a crash when I try to shutdown -- NULL pointer dereference
because something-or-other gets passed a NULL scope.  Is this the right
place to report this, or should I be sending that data to another list.

Matt

On Fri, Nov 09, 2001 at 11:10:59AM -0800, Grover, Andrew wrote:
> We should already be handling multiple power button definitions, so I'm
> confused why you're still seeing the problem. Could you please send me your
> dmesg output and /proc/acpi/dsdt output?
> 
> Thanks -- Regards -- Andy
> 
> > -----Original Message-----
> > From: Anders Peter Fugmann [mailto:afu@fugmann.dhs.org]
> > Sent: Friday, November 09, 2001 4:01 AM
> > To: andrew.grover@intel.com
> > Cc: linux-kernel@vger.kernel.org
> > Subject: [PATCH] fix ACPI multible power entries
> > Importance: High
> > 
> > 
> > Hi.
> > 
> > In trying to get ACPI to work on my system, i was stumbled to see two 
> > button entries under /proc/acpi/button/.
> > 
> > Attached is a patch which corrects this behaviour.
> > The patch applies to 2.4.14.
> > 
> > Regards
> > Anders Fugmann
> > 
> > 
> > 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

C:  They kicked your ass, didn't they?
S:  They were cheating!
					-- The Chief and Stef
User Friendly, 11/19/1997

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

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

* Re: [PATCH] fix ACPI multible power entries
  2001-11-09 19:10 Grover, Andrew
  2001-11-09 19:17 ` Matthew Dharm
@ 2001-11-10 10:20 ` Anders Peter Fugmann
  1 sibling, 0 replies; 4+ messages in thread
From: Anders Peter Fugmann @ 2001-11-10 10:20 UTC (permalink / raw)
  To: Grover, Andrew; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]

On 11/09/2001 08:10 PM, Grover, Andrew wrote:

> We should already be handling multiple power button definitions, so I'

> confused why you're still seeing the problem. 

Strange - The code did not take good care of it. Thats why the patch :-)

> Could you please send me your dmesg output and /proc/acpi/dsdt output?

Dmesg:

  tbxface-0099 [01] Acpi_load_tables      : ACPI Tables successfully loaded
Parsing 
Methods:...............................................................................................
..........................
121 Control Methods found and parsed (372 nodes total)
ACPI Namespace successfully loaded at root c02ee960
ACPI: Core Subsystem version [20011018]
evxfevnt-0081 [02] Acpi_enable           : Transition to ACPI mode 
successful
Executing device _INI methods:........................................
40 Devices found: 40 _STA, 0 _INI
Completing Region and Field initialization:..............
14/21 Regions, 0/0 Fields initialized (372 nodes total)
ACPI: Subsystem enabled
ACPI: System firmware supports S0 S1 S4 S5
Processor[0]: C0 C1
ACPI: Power Button (FF) found
ACPI: Multiple power buttons detected, ignoring fixed-feature
ACPI: Power Button (CM) found

Dsdt output is attatched, since it it binary.


> 
> Thanks -- Regards -- Andy
> 
> 


[-- Attachment #2: dsdt --]
[-- Type: application/octet-stream, Size: 11533 bytes --]

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

end of thread, other threads:[~2001-11-10 10:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-09 12:01 [PATCH] fix ACPI multible power entries Anders Peter Fugmann
  -- strict thread matches above, loose matches on Subject: below --
2001-11-09 19:10 Grover, Andrew
2001-11-09 19:17 ` Matthew Dharm
2001-11-10 10:20 ` Anders Peter Fugmann

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