Skip to contentSkip to conversation

ACPI: disable stray gpe correctly

PATCH Applied Zhang, Rui 4 participants 8 messages Mar 10, 2008 – Mar 17, 2008 ACPI

lore
Share & tools
lore

Zhang, Rui

author
#0 lore raw

PATCH 1/1 ACPI: disable stray gpe correctly

Disable stray GPE correctly
https://bugzilla.redhat.com/show_bug.cgi?id=251744
http://bugzilla.kernel.org/show_bug.cgi?id=6217

---
 drivers/acpi/events/evgpe.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/events/evgpe.c +2 -1
Index: linux-2.6/drivers/acpi/events/evgpe.c
===================================================================
@@ -248,7 +248,8 @@ acpi_status acpi_ev_disable_gpe(struct a
 
 	ACPI_FUNCTION_TRACE(ev_disable_gpe);
 
-	if (!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK)) {
+	if (gpe_event_info->flags &&
+		(!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK))) {
 		return_ACPI_STATUS(AE_OK);
 	}
 
reviewer Applied
#1 lore raw

applied.

thanks,
-Len

Quoted 30 lines · Rui

Disable stray GPE correctly
https://bugzilla.redhat.com/show_bug.cgi?id=251744
http://bugzilla.kernel.org/show_bug.cgi?id=6217

---
 drivers/acpi/events/evgpe.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/events/evgpe.c
===================================================================

drivers/acpi/events/evgpe.c +2 -2
@@ -248,7 +248,8 @@ acpi_status acpi_ev_disable_gpe(struct a
 
 	ACPI_FUNCTION_TRACE(ev_disable_gpe);
 
-	if (!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK)) {
+	if (gpe_event_info->flags &&
+		(!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK))) {
 		return_ACPI_STATUS(AE_OK);
 	}
 
 
 
--

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

#2 lore raw
Quoted 21 lines · Len Brown

applied.

thanks,
-Len

Quoted 15 lines · Rui

Disable stray GPE correctly
https://bugzilla.redhat.com/show_bug.cgi?id=251744
http://bugzilla.kernel.org/show_bug.cgi?id=6217

---
 drivers/acpi/events/evgpe.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/events/evgpe.c
===================================================================

drivers/acpi/events/evgpe.c +0 -0
@@ -248,7 +248,8 @@ acpi_status acpi_ev_disable_gpe(struct a
 
Quoted 8 lines

drivers/acpi/events/evgpe.c acpi_status acpi_ev_disable_gpe(struct a · line 255

Quoted 8 lines
drivers/acpi/events/evgpe.c +2 -1
 	ACPI_FUNCTION_TRACE(ev_disable_gpe);
 
-	if (!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK)) {
+	if (gpe_event_info->flags &&
+		(!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK))) {
 		return_ACPI_STATUS(AE_OK);
 	}
 

Causes ACPI battery problems...

https://bugzilla.redhat.com/show_bug.cgi?id=436959

reviewer
#3 lore raw
Quoted 28 lines
Quoted 17 lines · Rui
Quoted 15 lines

Disable stray GPE correctly
https://bugzilla.redhat.com/show_bug.cgi?id=251744
http://bugzilla.kernel.org/show_bug.cgi?id=6217

---
 drivers/acpi/events/evgpe.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/events/evgpe.c
===================================================================

drivers/acpi/events/evgpe.c +0 -0
@@ -248,7 +248,8 @@ acpi_status acpi_ev_disable_gpe(struct a
 
Quoted 8 lines

drivers/acpi/events/evgpe.c acpi_status acpi_ev_disable_gpe(struct a · line 255

Quoted 8 lines
drivers/acpi/events/evgpe.c +2 -1
 	ACPI_FUNCTION_TRACE(ev_disable_gpe);
 
-	if (!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK)) {
+	if (gpe_event_info->flags &&
+		(!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK))) {
 		return_ACPI_STATUS(AE_OK);
 	}
 

Causes ACPI battery problems...

Quoted 1 line

https://bugzilla.redhat.com/show_bug.cgi?id=436959

Okay, i've droppped it until 436959 can be figured out.

thanks Chuck,
-Len

#4 lore raw

This patch looked fairly benign to me, so I've committed it to the ACPICA core for the next release this week.

The comment I added for the patch looks like this:

/*
* Ignore this if the GPE is valid and not enabled.
*
* Flags is only zero if GPE is neither enabled or disabled -- it
may
* be a spurious or stray GPE -- disable it in the default case
below.

     */
    if (GpeEventInfo->Flags &&
       (!(GpeEventInfo->Flags & ACPI_GPE_ENABLE_MASK)))
    {
        return_ACPI_STATUS (AE_OK);
    }

If there are problems, I will back it out. Please let me know ASAP what the issue is in 436959.

Thanks,
Bob

Quoted 5 lines

-----Original Message-----
From: Len Brown [mailto:[email protected]]
Sent: Wednesday, March 12, 2008 1:10 PM
To: Chuck Ebbert
Cc: Zhang, Rui; linux-acpi; Lin, Ming M; Moore, Robert;

[email protected]

Quoted 15 lines

Subject: Re: [PATCH] ACPI: disable stray gpe correctly

Quoted 12 lines
Quoted 12 lines · Rui
Quoted 11 lines

Disable stray GPE correctly
https://bugzilla.redhat.com/show_bug.cgi?id=251744
http://bugzilla.kernel.org/show_bug.cgi?id=6217

---
 drivers/acpi/events/evgpe.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/events/evgpe.c

===================================================================

Quoted 23 lines
Quoted 15 lines
Quoted 4 lines
Quoted 4 lines
drivers/acpi/events/evgpe.c +0 -0
@@ -248,7 +248,8 @@ acpi_status acpi_ev_disable_gpe(struct a
 
Quoted 8 lines

drivers/acpi/events/evgpe.c acpi_status acpi_ev_disable_gpe(struct a · line 255

Quoted 8 lines
drivers/acpi/events/evgpe.c +2 -1
 	ACPI_FUNCTION_TRACE(ev_disable_gpe);
 
-	if (!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK)) {
+	if (gpe_event_info->flags &&
+		(!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK))) {
 		return_ACPI_STATUS(AE_OK);
 	}
 

Causes ACPI battery problems...

Quoted 1 line

https://bugzilla.redhat.com/show_bug.cgi?id=436959

Okay, i've droppped it until 436959 can be figured out.

thanks Chuck,
-Len

#5 lore raw
Quoted 20 lines · Robert

This patch looked fairly benign to me, so I've committed it to the ACPICA core for the next release this week.

The comment I added for the patch looks like this:

/*
* Ignore this if the GPE is valid and not enabled.
*
* Flags is only zero if GPE is neither enabled or disabled -- it
may
* be a spurious or stray GPE -- disable it in the default case
below.

     */
    if (GpeEventInfo->Flags &&
       (!(GpeEventInfo->Flags & ACPI_GPE_ENABLE_MASK)))
    {
        return_ACPI_STATUS (AE_OK);
    }
Quoted 3 lines

If there are problems, I will back it out. Please let me know ASAP what the issue is in 436959.

The battery information is all wrong with the patch applied.

The battery model changes from 'NBP6A24A1' to 'Main', all the capacities are wrong, and it reports that the battery is discharging when it is fully charged and the machine is running on AC.

#6 lore raw
In reply to Len Brown

I'm going to back this out until the reported problem is resolved. Bob

Quoted 8 lines

-----Original Message-----
From: Moore, Robert
Sent: Wednesday, March 12, 2008 2:59 PM
To: 'Len Brown'; Chuck Ebbert
Cc: Zhang, Rui; linux-acpi; Lin, Ming M; [email protected]
Subject: RE: [PATCH] ACPI: disable stray gpe correctly

This patch looked fairly benign to me, so I've committed it to the

ACPICA

Quoted 8 lines

core for the next release this week.

The comment I added for the patch looks like this:

/*
* Ignore this if the GPE is valid and not enabled.
*
* Flags is only zero if GPE is neither enabled or disabled -- it

may

Quoted 1 line

* be a spurious or stray GPE -- disable it in the default case

below.

Quoted 9 lines
    */
   if (GpeEventInfo->Flags &&
      (!(GpeEventInfo->Flags & ACPI_GPE_ENABLE_MASK)))
   {
       return_ACPI_STATUS (AE_OK);

}

If there are problems, I will back it out. Please let me know ASAP what

the

Quoted 12 lines

issue is in 436959.

Thanks,
Bob

Quoted 5 lines

-----Original Message-----
From: Len Brown [mailto:[email protected]]
Sent: Wednesday, March 12, 2008 1:10 PM
To: Chuck Ebbert
Cc: Zhang, Rui; linux-acpi; Lin, Ming M; Moore, Robert;

[email protected]

Quoted 8 lines
Quoted 8 lines

Subject: Re: [PATCH] ACPI: disable stray gpe correctly

Quoted 5 lines
Quoted 5 lines · Rui
Quoted 4 lines

Disable stray GPE correctly
https://bugzilla.redhat.com/show_bug.cgi?id=251744
http://bugzilla.kernel.org/show_bug.cgi?id=6217

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
---
 drivers/acpi/events/evgpe.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/events/evgpe.c

===================================================================

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

drivers/acpi/events/evgpe.c acpi_status acpi_ev_disable_gpe(struct a · line 252

Quoted 9 lines
drivers/acpi/events/evgpe.c +2 -1
@@ -248,7 +248,8 @@ acpi_status acpi_ev_disable_gpe(struct a
 
 	ACPI_FUNCTION_TRACE(ev_disable_gpe);
 
-	if (!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK)) {
+	if (gpe_event_info->flags &&
+		(!(gpe_event_info->flags &

ACPI_GPE_ENABLE_MASK))) {

Quoted 14 lines
Quoted 14 lines
Quoted 7 lines
Quoted 3 lines

drivers/acpi/events/evgpe.c acpi_status acpi_ev_disable_gpe(struct a · line 255

Quoted 3 lines
drivers/acpi/events/evgpe.c +0 -0
 		return_ACPI_STATUS(AE_OK);
 	}
 

Causes ACPI battery problems...

https://bugzilla.redhat.com/show_bug.cgi?id=436959

Okay, i've droppped it until 436959 can be figured out.

thanks Chuck,
-Len

author
#7 lore raw

Agree. :)
I'll work on that problem.

Thanks,
rui

Quoted 7 lines

-----Original Message-----
From: Moore, Robert
Sent: Saturday, March 15, 2008 5:49 AM
To: Moore, Robert; Len Brown; Chuck Ebbert
Cc: Zhang, Rui; linux-acpi; Lin, Ming M; [email protected]
Subject: RE: [PATCH] ACPI: disable stray gpe correctly

Quoted 12 lines

I'm going to back this out until the reported problem is resolved. Bob

Quoted 8 lines

-----Original Message-----
From: Moore, Robert
Sent: Wednesday, March 12, 2008 2:59 PM
To: 'Len Brown'; Chuck Ebbert
Cc: Zhang, Rui; linux-acpi; Lin, Ming M; [email protected]
Subject: RE: [PATCH] ACPI: disable stray gpe correctly

This patch looked fairly benign to me, so I've committed it to the

ACPICA

Quoted 8 lines
Quoted 8 lines

core for the next release this week.

The comment I added for the patch looks like this:

/*
* Ignore this if the GPE is valid and not enabled.
*
* Flags is only zero if GPE is neither enabled or disabled -- it

may

Quoted 1 line
Quoted 1 line

* be a spurious or stray GPE -- disable it in the default case

below.

Quoted 9 lines
Quoted 9 lines
    */
   if (GpeEventInfo->Flags &&
      (!(GpeEventInfo->Flags & ACPI_GPE_ENABLE_MASK)))
   {
       return_ACPI_STATUS (AE_OK);

}

If there are problems, I will back it out. Please let me know ASAP

what the

Quoted 7 lines
Quoted 7 lines

issue is in 436959.

Thanks,
Bob

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

-----Original Message-----
From: Len Brown [mailto:[email protected]]
Sent: Wednesday, March 12, 2008 1:10 PM
To: Chuck Ebbert
Cc: Zhang, Rui; linux-acpi; Lin, Ming M; Moore, Robert;

[email protected]

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Subject: Re: [PATCH] ACPI: disable stray gpe correctly

Quoted 5 lines
Quoted 5 lines · Rui
Quoted 4 lines

Disable stray GPE correctly
https://bugzilla.redhat.com/show_bug.cgi?id=251744
http://bugzilla.kernel.org/show_bug.cgi?id=6217

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
---
 drivers/acpi/events/evgpe.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/events/evgpe.c

===================================================================

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

drivers/acpi/events/evgpe.c acpi_status acpi_ev_disable_gpe(struct a · line 252

Quoted 9 lines
drivers/acpi/events/evgpe.c +2 -1
@@ -248,7 +248,8 @@ acpi_status acpi_ev_disable_gpe(struct a
 
 	ACPI_FUNCTION_TRACE(ev_disable_gpe);
 
-	if (!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK)) {
+	if (gpe_event_info->flags &&
+		(!(gpe_event_info->flags &

ACPI_GPE_ENABLE_MASK))) {

Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 7 lines
Quoted 3 lines

drivers/acpi/events/evgpe.c acpi_status acpi_ev_disable_gpe(struct a · line 255

Quoted 3 lines
drivers/acpi/events/evgpe.c +0 -0
 		return_ACPI_STATUS(AE_OK);
 	}
 

Causes ACPI battery problems...

https://bugzilla.redhat.com/show_bug.cgi?id=436959

Okay, i've droppped it until 436959 can be figured out.

thanks Chuck,
-Len