From owner-acpi-jp@jp.freebsd.org  Sun Oct 28 00:53:13 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id AAA48024;
	Sun, 28 Oct 2001 00:53:13 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (root@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id AAA48018
	for <acpi-jp@jp.freebsd.org>; Sun, 28 Oct 2001 00:53:13 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (iwasaki.imasy.or.jp [202.227.24.92])
	(authenticated as iwa with CRAM-MD5)
	by tasogare.imasy.or.jp (8.11.6+3.4W/8.11.6/tasogare) with ESMTP/inet id f9RFr9m07773;
	Sun, 28 Oct 2001 00:53:10 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Date: Sun, 28 Oct 2001 00:53:04 +0900 (JST)
Message-Id: <20011028.005304.41626165.iwasaki@jp.FreeBSD.org>
To: acpi-jp@jp.freebsd.org, funa@funa.org
Cc: jhb@FreeBSD.org
From: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
In-Reply-To: <20011016.015324.78789081.funa@funa.org>
References: <20011016.015324.78789081.funa@funa.org>
X-Mailer: Mew version 2.0 on Emacs 20.7 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1384
Subject: [acpi-jp 1384] Re: Libretto L2
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: iwasaki@jp.freebsd.org

# Please help me, kernel hackers!

Hi,

> But unfortunately, I can't set to any other sleep mode.
> 
> When I execute "acpiconf -s 1", it says
> 
>   acpi0: AcpiHwObtainSleepTypeRegisterData failed - AE_NOT_FOUND
> 
> and nothing happens.

No problem, there is no _S1 object in your DSDT, means not supported.

> When I execute "acpiconf -s 4", the message(as shown below) will show up
[snip]
>   acpi0: AcpiEnterSleepState failed - AE_NOT_EXIST

Your DSDT has _S4 but not support S4BIOS so failed I guess.

> When I execute "acpiconf -s 3", Libretto seems to be in sleeping state
> (LED is blinking), but when it wakes up, it causes a kernel panic.
> Here is a log of this situation.

This is real problem...

>   ata0: resetting devices .. ata0-slave: ATA identify retries exceeded
>   done
>   ata1: resetting devices .. done

I'm sure that ata_resume() causes process switching by tsleep() in
ata_command().  I guess this causes double fault panic.
I'm not sure how to disable process switching currently, but
could you try to surround DEVICE_RESUME(root_bus) in
acpi_SetSleepState() with mtx_lock_spin(&sched_lock) and
mtx_unlock_spin(&sched_lock)?

> only once. At that time, fxp0 was dead, just as same as the case
> of FIVA 206 (although rl0 was dead on FIVA) and the log of this
> situation is shown below.
[snip]
>   ata1: resetting devices .. done
>   fxp0: device timeout
>   fxp0: device timeout
>   fxp0: device timeout
>   fxp0: device timeout
>   ...

Hmm, I have no idea for this currently.  How about kldunload if_fxp
and load again?

> Here, I'll attach the dmesg, ASL and DSDT file(which is tar+gzipped).
> Any help is welcome.

Thanks, I will commit this.
BTW, what's the exact model name of your Libretto?

Thanks

