From owner-man-jp-reviewer@jp.freebsd.org  Mon Mar  1 20:41:55 1999
Received: (from daemon@localhost)
	by jaz.jp.freebsd.org (8.9.2+3.1W/8.7.3) id UAA03008;
	Mon, 1 Mar 1999 20:41:55 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from work.mzaki.nom (226.pool6.tokyo.att.ne.jp [165.76.23.241])
	by jaz.jp.freebsd.org (8.9.2+3.1W/8.7.3) with ESMTP id UAA03003
	for <man-jp-reviewer@jp.freebsd.org>; Mon, 1 Mar 1999 20:41:52 +0900 (JST)
	(envelope-from mzaki@e-mail.ne.jp)
Received: from localhost (localhost [127.0.0.1])
	by work.mzaki.nom (8.9.2/8.9.2) with ESMTP id UAA01464
	for <man-jp-reviewer@jp.freebsd.org>; Mon, 1 Mar 1999 20:41:50 +0900 (JST)
	(envelope-from mzaki@e-mail.ne.jp)
To: man-jp-reviewer@jp.freebsd.org
X-Mailer: Mew version 1.94b7 on XEmacs 21.0 (Pyrenean63)
X-fingerprint: BD 86 CD D9 66 FD 75 B0  A8 43 4B C4 E2 1B F5 B5
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
	boundary="--Next_Part(Mon_Mar__1_20:41:48_1999_518)--"
Content-Transfer-Encoding: 7bit
Message-Id: <19990301204150L.mzaki@e-mail.ne.jp>
Date: Mon, 01 Mar 1999 20:41:50 +0900
From: Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
X-Dispatcher: imput version 990212(IM106)
Lines: 169
Reply-To: man-jp-reviewer@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+981115
X-Sequence: man-jp-reviewer 1087
Subject: [man-jp-reviewer 1087] wd.4
Errors-To: owner-man-jp-reviewer@jp.freebsd.org
Sender: owner-man-jp-reviewer@jp.freebsd.org
X-Originator: mzaki@e-mail.ne.jp

----Next_Part(Mon_Mar__1_20:41:48_1999_518)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit


$B>>:j$H?=$7$^$9!#(B

$B:#2s$+$i;22C$5$;$F$$$?$@$-$?$$$H;W$$$^$9!#(B
$B!J$$$D$N$^$K$+(B section 4 $B$^$G$-$F$$$?$N$G$9$M!#(B
  $BFq4X$O(B 2 3 $B$G$7$g$&$+!D!D!#!K(B

wd.4 $B$N=iLu$G$9!#(B

$B!&#12U=jLuCm$rF~$l$?!#(B

$B!&%U%i%0$N(B 0x4000 $B$K$D$$$F$O0UL#$,$h$/$o$+$i$J$$!#(B
  it's coming out of sleep mode $B$O$I$&Lu$7$?$i$$$$$+$7$i!#(B

  $B$3$l$K$D$$$F$O%I%i%$%P%=!<%9(B /sys/i386/isa/wd.c $B$KCm$,$D$$$F$$$^$9!#(B

		/* OK, so the APM bios has put the disk into SLEEP mode,
		 * how can we tell ?  Uhm, we can't.  There is no 
		 * standardized way of finding out, and the only way to
		 * wake it up is to reset it.  Bummer.
		 *
		 * All the many and varied versions of the IDE/ATA standard
		 * explicitly tells us not to look at these registers if
		 * the disk is in SLEEP mode.  Well, too bad really, we
		 * have to find out if it's in sleep mode before we can 
		 * avoid reading the registers.
		 *
		 * I have reason to belive that most disks will return
		 * either 0xff or 0x00 in all but the status register 
		 * when in SLEEP mode, but I have yet to see one return 
		 * 0x00, so we don't check for that yet.
		 *
		 * The check for WDCS_BUSY is for the case where the
		 * bios spins up the disk for us, but doesn't initialize
		 * it correctly					/phk
		 */

  $B$G$b!"7k6I$I$&$$$&0UL#$J$s$G$7$g$&!)(B


$B!&(B (a.o.) $B$H$$$&$N$O$I$&$$$&0UL#$G$7$g$&$+!)(B


$B0J>e#3E@$,$h$/$o$+$j$^$;$s!#(B


+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
|  $B>>:j(B $BAGF;(B (Motomichi Matsuzaki/Mzaki/maki)                             |
|  mailto:mzaki@e-mail.ne.jp            $BEl5~Bg3XM}3XIt@8J*3X2JF0J*3X2]Dx(B  |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+


----Next_Part(Mon_Mar__1_20:41:48_1999_518)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Description: wd.4
Content-Disposition: attachment; filename="wd.4"
Content-Transfer-Encoding: 7bit

.\"
.\" Copyright (c) 1994 Wilko Bulte
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. The name of the author may not be used to endorse or promote products
.\"    derived from this software withough specific prior written permission
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\"	$Id: wd.4,v 1.10 1998/10/22 14:12:55 bde Exp $
.\" jpman %Id: wd.4,v 0.0 1999/02/22 16:14:07 horikawa Stab %
.\"
.Dd August 31, 1994
.Dt WD 4 i386
.Os FreeBSD
.Sh $BL>>N(B
.Nm wd
.Nd
$B0lHLE*$J(B WD100x/IDE $B%G%#%9%/%3%s%H%m!<%iMQ%I%i%$%P(B
.Sh $B=q<0(B
.Cd "controller wdc0 at isa? port" \&"IO_WD1\&" bio irq 14
.Cd "disk wd0 at wdc0 drive 0
.Cd "disk wd1 at wdc0 drive 1
.Pp
CMD640b IDE $B%3%s%H%m!<%iMQ(B:
.Cd "options"  \&"CMD640\&"
.Sh $B2r@b(B
$B$3$N%I%i%$%P$G!"%&%'%9%?%s%G%8%?%k(B WD100x $B%7%j!<%:$r%(%_%e%l!<%H$9$k(B
$B%3%s%H%m!<%i$K@\B3$5$l$?%G%#%9%/$K%"%/%;%9$G$-$k$h$&$K$J$j$^$9!#(B
$B$3$l$K$O!"(BWD1003 ST412 $B%3%s%H%m!<%i!"(BWD1007 ESDI $B%3%s%H%m!<%i!"(B
$B$=$7$F$[$H$s$I$N%^%6!<%\!<%I$K$"$k0lHLE*$J(B IDE $B%3%s%H%m!<%i$r4^$_$^$9!#(B
.Pp
WD100x $B%7%j!<%:$H$N8_49@-$K$D$$$F$O!"DL>o%3%s%H%m!<%i$N;qNA$K@bL@$,$"$j$^$9!#(B
.Pp
.Ar flags
$B%Q%i%a!<%?$r;H$C$F!"%I%i%$%P$K%R%s%H$d;XNa$rEA$($k$3$H$,$G$-$^$9!#(B
.Pp
16 bit $B@0?t$N%U%i%0$,%I%i%$%VKh$K$"$j!"(B
$B$=$l$>$l$K(B4($BLuCm(B:6)$B$D$N%S%C%H%U%#!<%k%I$,$"$j$^$9(B:
.\" By mzaki@e-mail.ne.jp (Mar 1 1999)
.Bl -tag -width 0x0000 -offset 1c
.It 0x8000
$B%I%i%$%V$,BP1~$7$F$$$l$P(B 32 bit $BE>Aw$r;H$$$^$9!#(B
.It 0x4000
$B%I%i%$%V$,%9%j!<%W%b!<%I$+$iC&$7$F$$$k$h$&$G$"$l$P!"(B
$B:.Mp$7$F$$$k$H$_$J$7$F:F=i4|2=$7$^$9!#(B
If drive looks like it's coming out of sleep mode, assume it's 
confused and reinitialize it.
.It 0x2000
$B:G6a$N(B PCI $B%A%C%W%;%C%H$K$"$k%P%9%^%9%?(B DMA $B5!G=$,$"$k$+D4$Y$FMxMQ$7$^$9!#(B
.It 0x1000
$B%G%U%)%k%H$N(B CHS $B%"%I%l%C%7%s%0$G$O$J$/!"(BLBA $B%"%I%l%C%7%s%0$r;H$$$^$9!#(B
.It 0x0f00
$B%X%C%I$N?t$r(B ((flags & 0xf00)>>8) $B$H8+$J$7$F!"(B
$B$=$l$K9g$&$h$&$K%7%j%s%@?t$r7W;;$7D>$7$^$9!#(B
.It 0x00ff
$B%I%i%$%V$N%^%k%A%;%/%?E>Aw%b!<%I$,;H$($l$P;H$$$^$9!#(B
$B:GBg$G(B (flags & 0x00ff) $B%;%/%?!<$NE>Aw$r;n$_$^$9!#(B
.El
.Pp
$B$3$N%U%i%0$O(B drive $B9T$K(B 16 bit $B@0?t$G;XDj$9$k$+!"(B
$B$"$k$$$O(B controller $B9T$K(B 32 bit $B@0?t$G;XDj$7$^$9!#(B
$B$3$N>l9g!">e0L(B 16 bit $B$,HV9f$NBg$-$J%I%i%$%V$KE,MQ$5$l$^$9!#(B
.Pp
.Dq Dv CMD640
$B%*%W%7%g%s$K$h$C$F!"(BCMD640b IDE $B%3%s%H%m!<%i$N7g4Y$KBP=h$9$k$h$&$K$J$j$^$9!#(B
$B$3$N%*%W%7%g%s$,;XDj$5$l$F$$$F!"(B
$B$+$D(B PCI $B%5%V%7%9%F%`$K$h$C$F%A%C%W$,8!=P$5$l$?>l9g$K$O!"(B
$B%W%i%$%^%j$H%;%+%s%@%j$N%3%s%H%m!<%i$OF1;~$K$O;H$o$l$^$;$s!#(B
.Sh $B4XO"%U%!%$%k(B
.Bl -tag -width Pa -compact
.It Pa /dev/wd*
$B%G%#%9%/$N%V%m%C%/%G%P%$%9%N!<%I(B
.It Pa /dev/rwd*
$B%G%#%9%/$N%-%c%i%/%?%G%P%$%9%N!<%I(B
.It Pa /sys/i386/conf/GENERIC
wd $B$K$h$k%7%9%F%`$N$?$a$N%8%'%M%j%C%/%+!<%M%k$N@_Dj%U%!%$%k$N%5%s%W%k(B
sample generic kernel config file for (a.o.) wd based systems
.It Pa /sys/i386/isa/wd.c
$B%I%i%$%P$N%=!<%9(B
.El
.Sh $B4XO"9`L\(B
.Xr bad144 8
.Sh $BCm<a(B
$B$3$N%3%s%H%m!<%i$H%G%#%9%/$NAH9g$o$;$O!"(B
$B<+F0E*$J%P%C%I%V%m%C%/$N=hM}$r$9$k$?$a$N5!9=$rHw$($F$$$^$;$s!#(B
$B%P%C%I%V%m%C%/$rD4$Y$k$K$O(B
.Xr bad144 8
$B$r<B9T$9$kI,MW$,$"$j$^$9!#(B
----Next_Part(Mon_Mar__1_20:41:48_1999_518)----
