From owner-acpi-jp@jp.freebsd.org  Wed Jul  5 20:13:43 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id UAA89514;
	Wed, 5 Jul 2000 20:13:43 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from kbtfw.kubota.co.jp (firewall-user@kbtfw.kubota.co.jp [133.253.102.202])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id UAA89508
	for <acpi-jp@jp.FreeBSD.org>; Wed, 5 Jul 2000 20:13:43 +0900 (JST)
	(envelope-from haro@tk.kubota.co.jp)
Received: by kbtfw.kubota.co.jp; id UAA08728; Wed, 5 Jul 2000 20:13:41 +0900 (JST)
Received: from unknown(133.253.122.1) by kbtfw.kubota.co.jp via smap (V4.2)
	id xma008653; Wed, 5 Jul 00 20:13:29 +0900
Received: from jkpc15.tk.kubota.co.jp ([192.168.7.250])
	by kbtmx.eto.kubota.co.jp (8.9.3+3.2W/3.7W) with ESMTP id UAA23084
	for <acpi-jp@jp.FreeBSD.org>; Wed, 5 Jul 2000 20:13:28 +0900 (JST)
Received: from localhost (localhost.ttr.kubota.co.jp [127.0.0.1])
	by jkpc15.tk.kubota.co.jp (8.9.3/3.7W-02/21/99) with ESMTP id UAA00601
	for <acpi-jp@jp.FreeBSD.org>; Wed, 5 Jul 2000 20:12:16 +0900 (JST)
From: haro@tk.kubota.co.jp (Munehiro Matsuda)
To: blind-copy-recipients:;;;@kubota.co.jp;
X-Dispatcher: 
Message-Id: <20000705201216J.haro@tk.kubota.co.jp>
Date: Wed, 05 Jul 2000 20:12:16 +0900
Mime-Version: 1.0
Content-Type: Message/rfc822
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: acpi-jp 461
Subject: [acpi-jp 461] Bcc: Re: randomdev and APM. Not working together?
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: haro@tk.kubota.co.jp

To: mark@grondar.za
Cc: current@FreeBSD.ORG
Subject: Re: randomdev and APM. Not working together? 
In-Reply-To: <20000705145916I.haro@tk.kubota.co.jp>
References: <20000701104544S.haro@tk.kubota.co.jp>
	<200007010649.IAA13685@grimreaper.grondar.za>
	<20000705145916I.haro@tk.kubota.co.jp>
X-Mailer: Mew version 1.94.1 on Emacs 20.6 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20000705201216R.haro@tk.kubota.co.jp>
Date: Wed, 05 Jul 2000 20:12:16 +0900
From: haro@tk.kubota.co.jp (Munehiro Matsuda)
X-Dispatcher: imput version 990905(IM130)
Lines: 60

From: haro@tk.kubota.co.jp (Munehiro Matsuda)
Date: Wed, 05 Jul 2000 14:59:16 +0900
::::> If I use randomdev for ssh, then APM seem to have stopped working.
::::
::::This is wierd; I am running this randomdev on my Libretto, (I wrote
::::it there), and it and APM are both fine.
::::
::::> Am I doing something wrong?
::::
::::No - you are doing everything right.
::::
::::Can you do any debugging on this? Are you able perhaps to trace the
::::kernel and see where it fails?
::
::Ok. I'll see what I can do.
::
::BTW, I've taken a diff of dmesg output between randomdev loaded and
::unloaded. As you can see, (1)outcome of "Calibrating clock" differs
::and (2)device attaching order is some what different. 
::
::I'll let you know, if I can find anthing.

  [This mail is Bcc'ed to acpi-jp@jp.FreeBSD.org]

I think I found the problem, and being able to work around it. 
But, I don't know how to realy fix it.

Here's summery of what was happening...

1. APM fails if randomdev_load="YES" in loader.conf and ACPI configured.
 Some drivers' probe & attach order will change, if randomdev module
was loaded using loader.conf.
 I have ACPI test driver (as of early May) and APM driver in my kernel,
that was affected by this change.

 1)Randomdev NOT Loaded: Probe & attach will happen in the order -
   (1)nxp0, (2)apm0, (3)acpi0 .....That's OK

 2)Randomdev Loaded: Probe & attach will happen in the order -
   (1)acpi0, (2)apm0, (3)nxp0 .....NG

   Because acpi0 access the BIOS first, APM support in BIOS seems to
   get turned off. :-(

If there's any way to statically set the probe & attach order, I would
like to know.

2. Work around was to include RANDMDEV in config file.
 I disabled it, because it was panicing on shutdown. 
 That being fixed in rev1.5 of randmdev.c, I have a working system, again.

Thanks you,
  Haro
=------------------------------------------------------------------------------
           _ _    Munehiro (haro) Matsuda
 -|- /_\  |_|_|   Business Incubation Dept., Kubota Corp.
 /|\ |_|  |_|_|   1-3 Nihonbashi-Muromachi 3-Chome
                  Chuo-ku Tokyo 103-8310, Japan
                  Tel: +81-3-3245-3318  Fax: +81-3-3245-3315
                  Email: haro@kubota.co.jp
