From owner-cvs-src@FreeBSD.ORG Thu Jul 1 00:51:36 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9AD6916A4CE; Thu, 1 Jul 2004 00:51:36 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BFFB43D39; Thu, 1 Jul 2004 00:51:36 +0000 (GMT) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i610pWke058611; Thu, 1 Jul 2004 00:51:32 GMT (envelope-from njl@repoman.freebsd.org) Received: (from njl@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i610pWTU058610; Thu, 1 Jul 2004 00:51:32 GMT (envelope-from njl) Message-Id: <200407010051.i610pWTU058610@repoman.freebsd.org> From: Nate Lawson Date: Thu, 1 Jul 2004 00:51:32 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/acpica acpi_ec.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2004 00:51:36 -0000 njl 2004-07-01 00:51:32 UTC FreeBSD src repository Modified files: sys/dev/acpica acpi_ec.c Log: Rework the code that waits for a response from the EC. Use an sx lock instead of a mutex so we do not unblock it in msleep(). If we do this, another event could occur, resetting the status register since reads reset it. While I'm here, remove the backoff approach. Instead, sleep in 10 ms chunks for up to the configured timeout using either DELAY (if we aren't booted yet) or tsleep. Help from: dillon Tested by: Andrew Thompson andy AT fud.org.nz Revision Changes Path 1.56 +35 -48 src/sys/dev/acpica/acpi_ec.c