diff options
author | Michael Knudsen <mk@cvs.openbsd.org> | 2007-04-17 16:04:01 +0000 |
---|---|---|
committer | Michael Knudsen <mk@cvs.openbsd.org> | 2007-04-17 16:04:01 +0000 |
commit | afea8c438f9b8d1926b53df4dc9eceef2454c9e1 (patch) | |
tree | dd520908c8b08f848bde9f1c161304a1e34ef9e4 /sys | |
parent | a5856ec854e53559582cfc464d04b07efbc74bf9 (diff) |
Fix a really emberrassing bug: Do not unconditionally call _DCK with a
parameter of 1 (dock).
This was causing acpidock to attempt to dock even if the machine was not
in its dock which was causing hangs on pre-60 series ThinkPads. It was
also causing my X60 to not see NOTIFY 0 (dock) messages which would
initiate the docking sequence.
Diff from Matthew R. Dempsky.
Tested on X60 by me, on T42/43 by brad, ckuethe, reyk, Johan M:son, and
on T21 by reyk. I think someone also tested on X40/41 but I don't
remember who. Thanks a lot.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/acpi/acpidock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpidock.c b/sys/dev/acpi/acpidock.c index 3b2e3c82c88..697ad81cfd3 100644 --- a/sys/dev/acpi/acpidock.c +++ b/sys/dev/acpi/acpidock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpidock.c,v 1.19 2007/04/16 23:51:15 mk Exp $ */ +/* $OpenBSD: acpidock.c,v 1.20 2007/04/17 16:04:00 mk Exp $ */ /* * Copyright (c) 2006,2007 Michael Knudsen <mk@openbsd.org> * @@ -163,7 +163,7 @@ acpidock_dockctl(struct acpidock_softc *sc, int dock) int rv; memset(&cmd, 0, sizeof cmd); - cmd.v_integer = 1; + cmd.v_integer = dock; cmd.type = AML_OBJTYPE_INTEGER; if (aml_evalname(sc->sc_acpi, sc->sc_devnode, "_DCK", 1, &cmd, &res) != 0) { |