From owner-acpi-jp@jp.FreeBSD.org Thu Jul 10 06:47:12 2003
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id h69LlCG56951;
	Thu, 10 Jul 2003 06:47:12 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet id h69LlBW56946
	for <acpi-jp@jp.freebsd.org>; Thu, 10 Jul 2003 06:47:11 +0900 (JST)
	(envelope-from jhb@FreeBSD.org)
Received: (qmail 11048 invoked from network); 9 Jul 2003 21:47:08 -0000
Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63])
          (envelope-sender <jhb@FreeBSD.org>)
          by mail11.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP
          for <acpi-jp@jp.freebsd.org>; 9 Jul 2003 21:47:08 -0000
Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1])
	by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h69Ll0GI099973;
	Wed, 9 Jul 2003 17:47:04 -0400 (EDT)
	(envelope-from jhb@FreeBSD.org)
Message-ID: <XFMail.20030709174714.jhb@FreeBSD.org>
X-Mailer: XFMail 1.5.4 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <20030709113003.L4186@root.org>
From: John Baldwin <jhb@freebsd.org>
To: Nate Lawson <nate@root.org>
Cc: current@freebsd.org, acpi-jp@jp.FreeBSD.org
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Wed, 09 Jul 2003 17:47:14 -0400
X-Sequence: acpi-jp 2402
Subject: [acpi-jp 2402] RE: PATCH - updated EC driver
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: jhb@FreeBSD.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+030702


On 09-Jul-2003 Nate Lawson wrote:
> On Wed, 9 Jul 2003, John Baldwin wrote:
>> On 09-Jul-2003 Nate Lawson wrote:
>> >    http://root.org/~nate/freebsd/ec-new.diff
>>
>> Not as broken as the last patch, but still broken for me:
>>
>>     ACPI-0432: *** Error: Handler for [EmbeddedControl] returned AE_NO_HARDWARE_RESPONSE
>>     ACPI-1287: *** Error: Method execution failed [\\_SB_.PCI0.PX41.SECN.BEXT] (Node
>>     0xc3342260),
>> AE_NO_HARDWARE_RESPONSE
>>     ACPI-1287: *** Error: Method execution failed [\\_SB_.PCI0.PX41.SECN.MAST._STA] (Node
>> 0xc3342320), AE_NO_HARDWARE_RESPONSE
> 
> Thanks for testing.
> 
> Try changing the 1000 in line 658 to 10000.  Your EC seems to take more
> than 1 ms to respond.  The old behavior was 10 ms which I thought was too
> long but apparently your system requires this.

Yes, this gets rid of the message at boot times.  I do get some of these messages
while the system is running, but I used to receive those erros before.  The only
difference is that now the error code is AE_NO_HARDWARE_RESPONSE rather than
AE_ERROR.

> BTW, what are the guidelines for DELAY vs. msleep?  I'm holding a mutex
> for the local EC for up to 10 ms in that case, in increments of DELAY(10).
> I would think that somewhere around 1 ms, the delay needs to become an
> msleep so other device interrupts can occur (i.e. EcGpeHandler).  I'm
> thinking about having the loop up to 1 ms be based on DELAY, and then 9
> calls to msleep(..., 1) for the really slow devices.  Let me know what you
> think is best.

That sounds fine to me.  10ms would be a very long time to hold a mutex.

> -Nate

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
