Date: Thu, 4 Jan 2001 01:02:45 +0900 (JST) From: Daichi GOTO <daichi@ongs.net> To: stable@FreeBSD.ORG Subject: Re: FUJITSU MO (ATAPI) with FreeBSD 4.2 Message-ID: <84778799.978537765817.JavaMail.daichi@localhost> In-Reply-To: <84775158.978447552384.JavaMail.daichi@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
> There is a way to use FUJITSU MO (ATAPI) ?
>
> /home/daichi/work(197) dmesg | grep ata
> atapci0: <AMD 756 ATA66 controller> port 0xf000-0xf00f at device 7.1 on pci0
> ata0: at 0x1f0 irq 14 on atapci0
> ata1: at 0x170 irq 15 on atapci0
> ad0: 29311MB <Maxtor 53073H4> [59554/16/63] at ata0-master UDMA66
> acd0: CD-RW <CD-W54E> at ata1-master using PIO4
> ata1-slave: <FUJITSU MCB3064AP/0033> optical device - NO DRIVER!
> /home/daichi/work(198)
>
> I'm using FreeBSD 4.2-Release. But he said "NO DRIVER!".
> It is rumored that you can use MO(ATAPI) in FreeBSD-current.
> Can I use it with FreeBSD 4.2-Release?
I have made simple patch to use MO(ATAPI).
--- /sys/dev/ata/atapi-all.c.orig Thu Jan 4 00:23:52 2001
+++ /sys/dev/ata/atapi-all.c Thu Jan 4 00:23:00 2001
@@ -99,6 +99,8 @@
break;
#endif
#if NATAPIFD > 0
+ case ATAPI_TYPE_OPTICAL:
+ ATP_PARAM->device_type = ATAPI_TYPE_DIRECT;
case ATAPI_TYPE_DIRECT:
if (afdattach(atp))
goto notfound;
The patched kernel says:
...
ad0: 29311MB <Maxtor 53073H4> [59554/16/63] at ata0-master UDMA66
acd0: CD-RW <CD-W54E> at ata1-master using PIO4
afd0: 508MB <FUJITSU MCB3064AP> [508/64/32] at ata1-slave using PIO4
...
How to format disks are follow:
640MB MO FFS Format:
# dd if=/dev/zero of=/dev/rafd0 bs=2048 count=1
1+0 records in
1+0 records out
2048 bytes transferred in 0.067482 secs (30349 bytes/sec)
# disklabel -r -w afd0 auto
# newfs /dev/rafd0c
Warning: Block size restricts cylinders per group to 10.
Warning: 8192 sector(s) in last cylinder unallocated
/dev/rafd0c: 1236992 sectors in 76 cylinders of 1 tracks, 16384 sectors
604.0MB in 8 cyl groups (10 c/g, 80.00MB/g, 9536 i/g)
super-block backups (for fsck -b #) at:
32, 163872, 327712, 491552, 655392, 819232, 983072, 1146912
# mount /dev/afd0 /mnt
# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 28893073 11180625 15401003 42% /
procfs 4 4 0 100% /proc
linprocfs 4 4 0 100% /usr/compat/linux/proc
/dev/afd0 608814 2 560108 0% /mnt
640MB MO FAT Format:
brave# dd if=/dev/zero of=/dev/rafd0 bs=2048 count=1
1+0 records in
1+0 records out
2048 bytes transferred in 0.556006 secs (3683 bytes/sec)
brave# disklabel -r -w afd0 auto
brave# newfs_msdos -F 32 /dev/rafd0
/dev/rafd0: 308636 sectors in 154318 FAT32 clusters (4096 bytes/cluster)
bps=2048 spc=2 res=8 nft=2 mid=0xf0 spt=32 hds=64 hid=0 bsec=309248 bspf=302 rdcl=2 infs=1 bkbs=2
brave# mount_msdos /dev/afd0 /mnt
brave# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 28893073 11180631 15400997 42% /
procfs 4 4 0 100% /proc
linprocfs 4 4 0 100% /usr/compat/linux/proc
/dev/afd0 617280 12 617268 0% /mnt
230MB MO FFS:
# dd if=/dev/zero of=/dev/rafd0 bs=512 count=1
1+0 records in
1+0 records out
512 bytes transferred in 0.111073 secs (4610 bytes/sec)
# disklabel -r -w afd0 auto
# newfs /dev/rafd0c
Warning: 2048 sector(s) in last cylinder unallocated
/dev/rafd0c: 444416 sectors in 109 cylinders of 1 tracks, 4096 sectors
217.0MB in 7 cyl groups (16 c/g, 32.00MB/g, 7744 i/g)
super-block backups (for fsck -b #) at:
32, 65568, 131104, 196640, 262176, 327712, 393248
# mount /dev/afd0 /mnt
# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 28893073 11180509 15401119 42% /
procfs 4 4 0 100% /proc
linprocfs 4 4 0 100% /usr/compat/linux/proc
/dev/afd0 215303 1 198078 0% /mnt
230MB FAT:
# dd if=/dev/zero of=/dev/rafd0 bs=512 count=1
1+0 records in
1+0 records out
512 bytes transferred in 0.109349 secs (4682 bytes/sec)
# disklabel -r -w afd0 auto
# newfs_msdos -F 32 /dev/rafd0
/dev/rafd0: 443512 sectors in 55439 FAT32 clusters (4096 bytes/cluster)
bps=512 spc=8 res=32 nft=2 mid=0xf0 spt=32 hds=64 hid=0 bsec=444416 bspf=434 rdcl=2 infs=1 bkbs=2
# mount_msdos /dev/afd0 /mnt
# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 28893073 11180535 15401093 42% /
procfs 4 4 0 100% /proc
linprocfs 4 4 0 100% /usr/compat/linux/proc
/dev/afd0 221764 12 221752 0% /mnt
Attention: This is simple patch for MO(ATAPI) only. Do not use with other optical disks(ATAPI).
Daichi T.GOTO(ONGS)
http://www.ongs.net/daichi, daichi@ongs.gr.jp
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84778799.978537765817.JavaMail.daichi>
