From: Nathan Bryant <nbryant-p32f3XyCuykqcZcGjlUOXw@public.gmane.org>
To: "Li, Shaohua" <shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: russell-1vnkWVZi4QaVc3sceRu5cw@public.gmane.org,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: bug in acpid scripts
Date: Thu, 12 Aug 2004 20:55:15 -0400 [thread overview]
Message-ID: <411C1173.9010100@optonline.net> (raw)
In-Reply-To: <B44D37711ED29844BEA67908EAF36F038ADB3E-4yWAQGcml65pB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
Li, Shaohua wrote:
>Hi,
>Oops, I'm sorry the patch has typo. I changed the parameter name after
>my test, but I forgot changing all. Could you please try this one? Sorry
>for the inconvenience.
>
>Thanks,
>Shaohua
>
Yes, I just changed your patch to the following and it works. I can
confirm it fixes the problem, no adverse effects
[-- Attachment #2: maskevent.patch3 --]
[-- Type: text/plain, Size: 2879 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/12 20:47:40-04:00 nbryant-p32f3XyCuykqcZcGjlUOXw@public.gmane.org
# This is a fixed version of shaohua's double-button-event patch
#
# drivers/acpi/sleep/main.c
# 2004/08/12 20:47:32-04:00 nbryant-p32f3XyCuykqcZcGjlUOXw@public.gmane.org +3 -3
# Fixed shaohua's double-button event patch
#
# drivers/acpi/event.c
# 2004/08/12 20:47:32-04:00 nbryant-p32f3XyCuykqcZcGjlUOXw@public.gmane.org +1 -1
# Fixed shaohua's double-button event patch
#
# drivers/acpi/sleep/main.c
# 2004/08/12 02:41:13-04:00 nbryant-p32f3XyCuykqcZcGjlUOXw@public.gmane.org +3 -1
# Import patch maskevent.patch
#
# drivers/acpi/event.c
# 2004/08/12 02:40:13-04:00 nbryant-p32f3XyCuykqcZcGjlUOXw@public.gmane.org +2 -1
# Import patch maskevent.patch
#
# drivers/acpi/bus.c
# 2004/08/12 02:39:43-04:00 nbryant-p32f3XyCuykqcZcGjlUOXw@public.gmane.org +2 -1
# Import patch maskevent.patch
#
diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c
--- a/drivers/acpi/bus.c 2004-08-12 20:49:37 -04:00
+++ b/drivers/acpi/bus.c 2004-08-12 20:49:37 -04:00
@@ -283,6 +283,7 @@
DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue);
extern int event_is_open;
+extern int acpi_event_is_masked;
int
acpi_bus_generate_event (
@@ -299,7 +300,7 @@
return_VALUE(-EINVAL);
/* drop event on the floor if no one's listening */
- if (!event_is_open)
+ if (!event_is_open || acpi_event_is_masked)
return_VALUE(0);
event = kmalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC);
diff -Nru a/drivers/acpi/event.c b/drivers/acpi/event.c
--- a/drivers/acpi/event.c 2004-08-12 20:49:37 -04:00
+++ b/drivers/acpi/event.c 2004-08-12 20:49:37 -04:00
@@ -17,7 +17,8 @@
/* Global vars for handling event proc entry */
static spinlock_t acpi_system_event_lock = SPIN_LOCK_UNLOCKED;
-int event_is_open = 0;
+int event_is_open;
+int acpi_event_is_masked;
extern struct list_head acpi_bus_event_list;
extern wait_queue_head_t acpi_bus_event_queue;
diff -Nru a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
--- a/drivers/acpi/sleep/main.c 2004-08-12 20:49:37 -04:00
+++ b/drivers/acpi/sleep/main.c 2004-08-12 20:49:37 -04:00
@@ -73,7 +73,7 @@
* arch-specific assembly, which in turn call acpi_enter_sleep_state().
* It's unfortunate, but it works. Please fix if you're feeling frisky.
*/
-
+extern int acpi_event_is_masked;
static int acpi_pm_enter(u32 pm_state)
{
acpi_status status = AE_OK;
@@ -92,6 +92,7 @@
local_irq_save(flags);
acpi_enable_wakeup_device(acpi_state);
+ acpi_event_is_masked = 1;
switch (pm_state)
{
case PM_SUSPEND_STANDBY:
@@ -142,6 +143,7 @@
acpi_leave_sleep_state(acpi_state);
acpi_disable_wakeup_device(acpi_state);
+ acpi_event_is_masked = 0;
/* reset firmware waking vector */
acpi_set_firmware_waking_vector((acpi_physical_address) 0);
next prev parent reply other threads:[~2004-08-13 0:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-13 0:52 bug in acpid scripts Li, Shaohua
[not found] ` <B44D37711ED29844BEA67908EAF36F038ADB3E-4yWAQGcml65pB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-08-13 0:55 ` Nathan Bryant [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-08-12 7:07 Li, Shaohua
[not found] ` <B44D37711ED29844BEA67908EAF36F038AD732-4yWAQGcml65pB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-08-13 0:24 ` Nathan Bryant
2004-08-13 6:18 ` Stefan Seyfried
2004-07-24 13:23 Li, Shaohua
[not found] ` <B44D37711ED29844BEA67908EAF36F03665E4F-4yWAQGcml65pB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-07-25 1:42 ` Russell Neches
2004-07-23 19:36 Russell Neches
[not found] ` <20040723193658.GA3331-5z3TbH0F9hyr8sbHwu5NIg@public.gmane.org>
2004-07-23 20:39 ` Vernon Mauery
[not found] ` <1090615197.9015.7.camel-DNmeG3802II@public.gmane.org>
2004-07-23 23:34 ` Russell Neches
2004-07-24 12:50 ` Matthew Garrett
[not found] ` <1090673420.4412.14.camel-myFlNLNQP+Q@public.gmane.org>
2004-07-24 13:51 ` Mattia Dongili
[not found] ` <20040724135111.GC2328-MEqNC12sBsHxa7XIdbXXog@public.gmane.org>
2004-07-24 14:40 ` Luca Capello
2004-08-11 13:40 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=411C1173.9010100@optonline.net \
--to=nbryant-p32f3xycuykqczcgjluoxw@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=russell-1vnkWVZi4QaVc3sceRu5cw@public.gmane.org \
--cc=shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.