RE: 2.6.0-test9 regression: panic on Fn+F7 hotkey

Li, Shaohua
2003-10-28T08:14:56Z

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

Hi,

I missed non-ECDT situation. Try this one.

Thanks,
Shaohua

> -----Original Message-----
> From: Sérgio Monteiro Basto [mailto:sergiomb-hHo3WeeoaswVhHzd4jOs4w@public.gmane.org]
> Sent: 2003年10月28日 14:23
> To: Li, Shaohua
> Cc: Karol Kozimor; acpi-devel
> Subject: RE: [ACPI] 2.6.0-test9 regression: panic on Fn+F7 hotkey
>
> Hi
> Pressing Fn+F7 doesnt seems to be in boot time.
> For me acpi_ec_gpe_query.patch in 2.4.23-pre8, hangs my laptop when I
> press lid button, after boot and after login after enter in X, after all
> things up.
>
> On Tue, 2003-10-28 at 02:30, Li, Shaohua wrote:
> > Hi,
> > Which time did the panic occur? Boot time? Yes, I made the patch to
> fix some boot time errors.
> > But if boot is ok, the patch should not impact anything.
>
> but have a lot of impact.
> in my case, boots without problems.
>
> Please give me more info.
> >
> > Thanks,
> > Shaohua
> >
> >
> > > -----Original Message-----
> > > From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:acpi-devel-
> > > admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Karol Kozimor
> > > Sent: 2003年10月28日 1:08
> > > To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > > Subject: [ACPI] 2.6.0-test9 regression: panic on Fn+F7 hotkey
> > >
> > > Hi,
> > > Pressing Fn+F7 to turn the LCD on / off causes 2.6.0-test9 to panic.
> > > That's
> > > AFAIK the single event that causes such a behaviour, other keys work
> fine.
> > > Reverting the acpi_ec_gpe_query.patchi[1] fixes the issue and makes
> the
> > > kernel
> > > run fine.
> > >
> > > [1]:
> > >
> http://www.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/test/2.4.2
> > > 2/20031017152411-acpi_ec_gpe_query.patch
> > >
> > > Best regards,
> > >
> > > --
> > > Karol 'sziwan' Kozimor
> > > sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: The SF.net Donation Program.
> > > Do you like what SourceForge.net is doing for the Open
> > > Source Community? Make a contribution, and help us add new
> > > features and functionality. Click here: http://sourceforge.net/donate/
> > > _______________________________________________
> > > Acpi-devel mailing list
> > > Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > > https://lists.sourceforge.net/lists/listinfo/acpi-devel
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: The SF.net Donation Program.
> > Do you like what SourceForge.net is doing for the Open
> > Source Community? Make a contribution, and help us add new
> > features and functionality. Click here: http://sourceforge.net/donate/
> > _______________________________________________
> > Acpi-devel mailing list
> > Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > https://lists.sourceforge.net/lists/listinfo/acpi-devel
> --
> SérgioMB
> email: sergiomb-hHo3WeeoaswVhHzd4jOs4w@public.gmane.org
>
> Who gives me one shell, give me everything.

[-- Attachment #2: ec_gpe.patch2 --]
[-- Type: application/octet-stream, Size: 1888 bytes --]

--- a/drivers/acpi/ec.c 2003-10-28 15:58:44.000000000 +0800
+++ b/drivers/acpi/ec.c 2003-10-28 16:05:17.000000000 +0800
@@ -90,6 +90,14 @@
/* External interfaces use first EC only, so remember */
static struct acpi_device *first_ec;

+/*
+ * We use kernel thread to handle ec's gpe query, so the query may defer.
+ * The query need a context, which can be freed when we replace ec_ecdt
+ * with EC device. So defered query may have a wrong context.
+ * We use an indication to avoid it
+ */
+static int ec_device_init = 0;
+
/* --------------------------------------------------------------------------
Transaction Management
-------------------------------------------------------------------------- */
@@ -389,8 +397,11 @@

acpi_disable_gpe(NULL, ec->gpe_bit, ACPI_ISR);

- status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
- acpi_ec_gpe_query, ec);
+ if (!ec_device_init)
+ acpi_ec_gpe_query(ec); /* directly query when device didn't init */
+ else
+ status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
+ acpi_ec_gpe_query, ec);
}

/* --------------------------------------------------------------------------
@@ -574,6 +585,7 @@
sprintf(acpi_device_name(device), "%s", ACPI_EC_DEVICE_NAME);
sprintf(acpi_device_class(device), "%s", ACPI_EC_CLASS);
acpi_driver_data(device) = ec;
+ ec_device_init = 1;

/* Use the global lock for all EC transactions? */
acpi_evaluate_integer(ec->handle, "_GLK", NULL, &ec->global_lock);
@@ -582,6 +594,7 @@
we now have the *real* EC info, so kill the makeshift one.*/
acpi_evaluate_integer(ec->handle, "_UID", NULL, &uid);
if (ec_ecdt && ec_ecdt->uid == uid) {
+ acpi_disable_gpe(NULL, ec_ecdt->gpe_bit, ACPI_NOT_ISR);
acpi_remove_address_space_handler(ACPI_ROOT_OBJECT,
ACPI_ADR_SPACE_EC, &acpi_ec_space_handler);