> Date: Thu, 12 Aug 2010 00:08:57 +0200
> From: David Coppa <[email protected]>
> 
> > > Date: Tue, 10 Aug 2010 23:15:32 +0200
> > > From: Mike Belopuhov <[email protected]>
> > > 
> > > Hi,
> > > 
> > > I have a Thinkpad X41 which doesn't do ACPI suspend properly
> > > (it immediately wakes up after 'zzz').  So I wonder if anyone
> > > can give me hints what to look at, or if someone is willing
> > > to take a closer look at acpidump?  I won't mind doing some
> > > debugging myself, but at the moment I'm clueless what to start
> > > looking at.  As I said it tries to suspend, blinks the "moon",
> > > then it comes back as if something woke it up.  I wasn't
> > > running X while doing that test.

Can you guys give the diff below a go?

Index: acpi.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/acpi.c,v
retrieving revision 1.209
diff -u -p -r1.209 acpi.c
--- acpi.c      8 Aug 2010 20:45:18 -0000       1.209
+++ acpi.c      14 Aug 2010 14:22:29 -0000
@@ -108,6 +108,7 @@ int acpi_foundhid(struct aml_node *, voi
 int    acpi_foundec(struct aml_node *, void *);
 int    acpi_foundtmp(struct aml_node *, void *);
 int    acpi_foundprw(struct aml_node *, void *);
+int    acpi_foundpsw(struct aml_node *, void *);
 int    acpi_foundvideo(struct aml_node *, void *);
 int    acpi_foundsony(struct aml_node *node, void *arg);
 
@@ -1571,6 +1572,21 @@ acpi_foundprw(struct aml_node *node, voi
        return 0;
 }
 
+int
+acpi_foundpsw(struct aml_node *node, void *arg)
+{
+       struct acpi_softc *sc = arg;
+       struct aml_value val;
+
+       bzero(&val, sizeof val);
+       val.type = AML_OBJTYPE_INTEGER;
+       val.v_integer = 0;
+       val.length = 1;
+
+       aml_evalnode(sc, node, 1, &val, NULL);
+       return 0;
+}
+
 struct gpe_block *
 acpi_find_gpe(struct acpi_softc *sc, int gpe)
 {
@@ -1625,6 +1641,7 @@ acpi_init_gpes(struct acpi_softc *sc)
                }
        }
        aml_find_node(&aml_root, "_PRW", acpi_foundprw, sc);
+       aml_find_node(&aml_root, "_PSW", acpi_foundpsw, sc);
        sc->sc_maxgpe = ngpe;
 }

Reply via email to