From owner-FreeBSD-tech-jp@jp.freebsd.org  Sat Jul 11 18:08:26 1998
Received: (from daemon@localhost)
	by jaz.jp.freebsd.org (8.8.8+3.0Wbeta13/8.7.3) id SAA21215;
	Sat, 11 Jul 1998 18:08:26 +0900 (JST)
	(envelope-from owner-FreeBSD-tech-jp@jp.FreeBSD.org)
Received: from shidahara1.planet.kobe-u.ac.jp (root@shidahara1.planet.kobe-u.ac.jp [133.30.50.200])
	by jaz.jp.freebsd.org (8.8.8+3.0Wbeta13/8.7.3) with ESMTP id SAA21209
	for <FreeBSD-tech-jp@jp.freebsd.org>; Sat, 11 Jul 1998 18:08:24 +0900 (JST)
	(envelope-from takawata@shidahara1.planet.kobe-u.ac.jp)
Received: from shidahara1.planet.kobe-u.ac.jp (localhost [127.0.0.1])
	by shidahara1.planet.kobe-u.ac.jp (8.8.8+2.7Wbeta7/8.8.8) with ESMTP id SAA00472
	for <FreeBSD-tech-jp@jp.freebsd.org>; Sat, 11 Jul 1998 18:01:22 +0900 (JST)
Message-Id: <199807110901.SAA00472@shidahara1.planet.kobe-u.ac.jp>
To: FreeBSD-tech-jp@jp.freebsd.org
In-reply-to: Your message of "Fri, 03 Jul 1998 12:26:23 JST"
References: <199807021225.VAA15293@volvo.kom.comm.waseda.ac.jp>  <199807030326.MAA07052@sakura.astec.co.jp> 
Date: Sat, 11 Jul 1998 18:01:22 +0900
From: Takanori Watanabe <takawata@shidahara1.planet.kobe-u.ac.jp>
Reply-To: FreeBSD-tech-jp@jp.freebsd.org
Precedence: bulk
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=24e+ JFUG special]
X-Sequence: FreeBSD-tech-jp 1631
Subject: [FreeBSD-tech-jp 1631] ATAPI MO (Re: What is difference between Direct-Access and Optical?
	 )
Errors-To: owner-FreeBSD-tech-jp@jp.freebsd.org
Sender: owner-FreeBSD-tech-jp@jp.freebsd.org

In message <199807030326.MAA07052@sakura.astec.co.jp>, Satoh Junichi $B$5$s$$$o$/(B:
>$B$=$&$G$9$M!#(Bread/write $B$K4X$9$k4pK\E*$J%3%^%s%I(B ATAPI $B$J$N$G(B
>$B$$$C$7$g$N$O$:$G$9!#$H$$$&$o$1$G!"(Bwfd $B%I%i%$%P$G(B attach $B$G$-$l$P(B
>$B$H$j$"$($:F0$/$G$7$g$&$M!#(B

$B$H$$$&$3$H$G!"=P@h$+$i5"$C$FMh$?$N$GAaB.$d$C$F$_$^$7$?!#(B
$B$H$j$"$($:!"(B
--- atapi.c.orig	Sat Jul 11 17:14:45 1998
+++ atapi.c	Sat Jul 11 17:26:35 1998
@@ -323,8 +323,14 @@
 	case AT_TYPE_OPTICAL:           /* optical disk */
 #if NWMD > 0
 		/* Add your driver here */
-#else
-		printf ("wdc%d: ATAPI optical disks not supported yet\n", ctlr);
+#elif NWFD > 0
+		printf ("wdc%d: Trying to Attach as wfd\n",ctlr);
+		if(wfdattach(ata,unit,ap,ata->debug) < 0)
+			break;
+		ata->attached[unit]=1;
+		return (1);
+#else 
+		printf ("wdc%d: ATAPI optical disks not supported yet\n", ctlr);#endif
 #endif
 		break;
 	}

$B$H$$$C$?JQ99$r$7$F(BFAT FS$B$r9=C[$7$?(B230MB MO$B$rFM$C9~$s$G(Bboot$B$7$F$_$^$7$?!#(B
dmesg$B$N4XO"ItJ,(B
wdc0 at 0x1f0-0x1f7 irq 14 on isa
wdc0: unit 0 (wd0): <IBM-DTTA-371440>
wd0: 13783MB (28229040 sectors), 28005 cyls, 16 heads, 63 S/T, 512 B/S 
$B",$J$s$G$3$l$O(B3.0-980520-SNAP$B$G$9!#(B
wdc1 at 0x170-0x177 irq 15 on isa
wdc1: unit 0 (atapi): <FX320S/q01>, removable, intr, dma, iordis
wcd0: 5512Kb/sec, 256Kb cache, audio play, 255 volume levels, ejectable tray
wcd0: no disc inside, unlocked
wdc1: unit 1 (atapi): <FUJITSU MCA3064AP/0031>, removable, accel, ovlap, dma, iordis


>$B$G$b!"(Bmode select $B$,0c$&$C$F$3$H$O!"(Bmode sense $B$b0c$&$C$F$3$H(B
>$B$J$N$G!"(Bwfd $B%I%i%$%P$G(B ATAPI MO $B$b;H$($k$h$&$K$9$k$?$a$K$O!"(B
>$B:GDc8B(B mode sense $B$7$F(B CAP_PAGE $B$r$&$^$/<hF@$G$-$k$h$&$K$7$F(B
>$B$"$2$J$$$H$$$1$J$$$H;W$$$^$9!#(B

$B$3$l$,1F6A$7$F$k$N$G$7$g$&$+!#(B
wdc1: Trying to	 Attach as wfd
wfd0: medium type=0x3
wfd0: 217 cyls, 64 heads, 32 S/T, 512 B/S

$B$G$b!"(B230MB MO$B>e$K9=C[$7$?(BFAT FS$B>e$N%U%!%$%k$OA4$/LdBj$J$/FI$_=q$-$G$-$^$7$?!#(B
$B$7$+$7!"(B640MB MO$B>e$N$b$N$O(BFAT FFS$B$H$b$&$^$/9T$-$^$;$s!#(B
FFS$B$rFM$C9~$s$G$_$?$P$"$$!"(B
wfd0: media changed
wfd0: media changed
wfd0: raw partition size != slice size
wfd0: start 0, end 309247, size 309248
wfd0c: start 0, end 310351, size 310352
wfd0: truncating raw partition
wfd0: rejecting partition in BSD label: it isn't entirely within the slice
wfd0: start 0, end 309247, size 309248
wfd0a: start 0, end 310351, size 310352

$B$H$$$&%a%C%;!<%8$,$G$F!"%G%#%9%/%i%Y%k$,FI$a$F$J$$$h$&$G$9!#(B


# /dev/wfd0:
type: unknown
disk: 
label: 
flags:
bytes/sector: 2048
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 151
sectors/unit: 309248
rpm: 720
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# milliseconds
track-to-track seek: 0	# milliseconds
drivedata: 0 

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c:   309248        0    unused        0     0       	# (Cyl.    0 - 150)

$BJs9p$N$_$G$9$,!#(B

$BEOJUB:5*(B
$B?@8MBg3XBg3X1!<+A32J3X8&5f2J(BD1$B>pJs%a%G%#%"2J3X@l96(B
<a href="http://www.planet.kobe-u.ac.jp/~takawata/key.html">
Public Key</a>
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 
