* [PATCH] ACPI: disable the gpe that doesn't have a GPE handler correctly
@ 2007-11-19 7:32 Zhang Rui
2007-11-20 2:10 ` Zhang Rui
0 siblings, 1 reply; 3+ messages in thread
From: Zhang Rui @ 2007-11-19 7:32 UTC (permalink / raw)
To: lenb, astarikovskiy; +Cc: linux-acpi
From: Zhang Rui <rui.zhang@intel.com>
The current code only disable the GPE by judging the
GPE type, which is one of WAKE, RUNTIME and WAKE_RUN.
In bug 6217, GPE 17 is enabled by the AML code ...
And it will be triggerred when an extra CRT is connected.
As GPE 17 is not ec gpe, and there is no _Lxx/_Exx method
exists in the _GPE scope, the type flag of GPE 17 is cleared
at the boot time and it's none of the three GPE types.
In this case, the GPE is not disabled correctly.
http://bugzilla.kernel.org/show_bug.cgi?id=6217
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
drivers/acpi/events/evgpe.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: linux-2.6/drivers/acpi/events/evgpe.c
===================================================================
--- linux-2.6.orig/drivers/acpi/events/evgpe.c
+++ linux-2.6/drivers/acpi/events/evgpe.c
@@ -277,11 +277,10 @@ acpi_status acpi_ev_disable_gpe(struct a
/* Disable the requested runtime GPE */
ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED);
- status = acpi_hw_write_gpe_enable_reg(gpe_event_info);
- break;
default:
- return_ACPI_STATUS(AE_BAD_PARAMETER);
+ acpi_hw_write_gpe_enable_reg(gpe_event_info);
+ break;
}
return_ACPI_STATUS(AE_OK);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ACPI: disable the gpe that doesn't have a GPE handler correctly
2007-11-19 7:32 [PATCH] ACPI: disable the gpe that doesn't have a GPE handler correctly Zhang Rui
@ 2007-11-20 2:10 ` Zhang Rui
2007-11-20 8:55 ` Alexey Starikovskiy
0 siblings, 1 reply; 3+ messages in thread
From: Zhang Rui @ 2007-11-20 2:10 UTC (permalink / raw)
To: lenb, astarikovskiy; +Cc: linux-acpi
On Mon, 2007-11-19 at 15:32 +0800, Zhang Rui wrote:
> From: Zhang Rui <rui.zhang@intel.com>
>
> The current code only disable the GPE by judging the
> GPE type, which is one of WAKE, RUNTIME and WAKE_RUN.
> In bug 6217, GPE 17 is enabled by the AML code ...
> And it will be triggerred when an extra CRT is connected.
> As GPE 17 is not ec gpe, and there is no _Lxx/_Exx method
> exists in the _GPE scope, the type flag of GPE 17 is cleared
> at the boot time and it's none of the three GPE types.
> In this case, the GPE is not disabled correctly.
>
> http://bugzilla.kernel.org/show_bug.cgi?id=6217
>
Hi, Alexey,
Any comments on this patch? :)
Thanks,
Rui
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> ---
> drivers/acpi/events/evgpe.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> Index: linux-2.6/drivers/acpi/events/evgpe.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/events/evgpe.c
> +++ linux-2.6/drivers/acpi/events/evgpe.c
> @@ -277,11 +277,10 @@ acpi_status acpi_ev_disable_gpe(struct a
> /* Disable the requested runtime GPE */
>
> ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED);
> - status = acpi_hw_write_gpe_enable_reg(gpe_event_info);
> - break;
>
> default:
> - return_ACPI_STATUS(AE_BAD_PARAMETER);
> + acpi_hw_write_gpe_enable_reg(gpe_event_info);
> + break;
> }
>
> return_ACPI_STATUS(AE_OK);
> -
> 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] 3+ messages in thread
* Re: [PATCH] ACPI: disable the gpe that doesn't have a GPE handler correctly
2007-11-20 2:10 ` Zhang Rui
@ 2007-11-20 8:55 ` Alexey Starikovskiy
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Starikovskiy @ 2007-11-20 8:55 UTC (permalink / raw)
To: Zhang Rui; +Cc: lenb, astarikovskiy, linux-acpi
Zhang Rui wrote:
> On Mon, 2007-11-19 at 15:32 +0800, Zhang Rui wrote:
>
>> From: Zhang Rui <rui.zhang@intel.com>
>>
>> The current code only disable the GPE by judging the
>> GPE type, which is one of WAKE, RUNTIME and WAKE_RUN.
>> In bug 6217, GPE 17 is enabled by the AML code ...
>> And it will be triggerred when an extra CRT is connected.
>> As GPE 17 is not ec gpe, and there is no _Lxx/_Exx method
>> exists in the _GPE scope, the type flag of GPE 17 is cleared
>> at the boot time and it's none of the three GPE types.
>> In this case, the GPE is not disabled correctly.
>>
>> http://bugzilla.kernel.org/show_bug.cgi?id=6217
>>
>>
> Hi, Alexey,
> Any comments on this patch? :)
>
>
See below. Idea itself seem to be right.
> Thanks,
> Rui
>
>> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
>> ---
>> drivers/acpi/events/evgpe.c | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> Index: linux-2.6/drivers/acpi/events/evgpe.c
>> ===================================================================
>> --- linux-2.6.orig/drivers/acpi/events/evgpe.c
>> +++ linux-2.6/drivers/acpi/events/evgpe.c
>> @@ -277,11 +277,10 @@ acpi_status acpi_ev_disable_gpe(struct a
>> /* Disable the requested runtime GPE */
>>
>> ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED);
>> - status = acpi_hw_write_gpe_enable_reg(gpe_event_info);
>> - break;
>>
put /* lint -fallthrough */ here, same as above.
>>
>> default:
>> - return_ACPI_STATUS(AE_BAD_PARAMETER);
>> + acpi_hw_write_gpe_enable_reg(gpe_event_info);
>> + break;
>>
don't need this break...
>> }
>>
>> return_ACPI_STATUS(AE_OK);
>>
Regards,
Alex.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-20 8:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-19 7:32 [PATCH] ACPI: disable the gpe that doesn't have a GPE handler correctly Zhang Rui
2007-11-20 2:10 ` Zhang Rui
2007-11-20 8:55 ` Alexey Starikovskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox