Rewert the atapi CDROM driver's name to wcd.

This is to avoid confusion with the new system.
Also provide real entires in MAKEDEV for the new system.
This commit is contained in:
Søren Schmidt 1999-03-16 13:34:03 +00:00
parent 9ef416cfed
commit d99434fb80
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44801
15 changed files with 202 additions and 166 deletions

View file

@ -121,7 +121,7 @@
# ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth) # ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth)
# kbd keyboard devices # kbd keyboard devices
# #
# $Id: MAKEDEV,v 1.191 1999/03/02 16:04:27 roger Exp $ # $Id: MAKEDEV,v 1.192 1999/03/05 23:08:45 gibbs Exp $
# #
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
@ -211,7 +211,7 @@ all)
sh MAKEDEV od0 # bdev, optical disk sh MAKEDEV od0 # bdev, optical disk
sh MAKEDEV wfd0 # bdev, LS-120 floppy sh MAKEDEV wfd0 # bdev, LS-120 floppy
sh MAKEDEV vn0 # bdev, virtual disk sh MAKEDEV vn0 # bdev, virtual disk
sh MAKEDEV cd0 matcd0 mcd0 scd0 acd0 # bdev, cdrom sh MAKEDEV cd0 matcd0 mcd0 scd0 wcd0 # bdev, cdrom
sh MAKEDEV ft0 sa0 wt0 wst0 # bdev, tape sh MAKEDEV ft0 sa0 wt0 wst0 # bdev, tape
sh MAKEDEV vty4 # cdev, virtual tty sh MAKEDEV vty4 # cdev, virtual tty
sh MAKEDEV cuaa0 cuaa1 cuaa2 cuaa3 # cdev, serial tty sh MAKEDEV cuaa0 cuaa1 cuaa2 cuaa3 # cdev, serial tty
@ -290,9 +290,11 @@ wt*)
;; ;;
# Individual slices. # Individual slices.
od*s*|sd*s*|da*s*|vn*s*|wd*s*|wfd*s*|fla*s*) ad*s*|od*s*|sd*s*|da*s*|vn*s*|wd*s*|afd*s*|wfd*s*|fla*s*)
umask $disk_umask umask $disk_umask
case $i in case $i in
ad*s*) name=ad; blk=30; chr=116;;
afd*s*) name=afd; blk=32; chr=118;;
fla*s*) name=fla; blk=28; chr=101;; fla*s*) name=fla; blk=28; chr=101;;
od*s*) name=od; blk=4; chr=13;; od*s*) name=od; blk=4; chr=13;;
sd*s*) name=sd; blk=4; chr=13;; sd*s*) name=sd; blk=4; chr=13;;
@ -302,7 +304,7 @@ od*s*|sd*s*|da*s*|vn*s*|wd*s*|wfd*s*|fla*s*)
wfd*s*) name=wfd; blk=1; chr=87;; wfd*s*) name=wfd; blk=1; chr=87;;
esac esac
case $i in case $i in
fla*s*|wfd*s*) afd*s*|fla*s*|wfd*s*)
unit=`expr $i : '...\([0-9]*\)s'` unit=`expr $i : '...\([0-9]*\)s'`
slice=`expr $i : '...[0-9]*s\([0-9]*\)'` slice=`expr $i : '...[0-9]*s\([0-9]*\)'`
part=`expr $i : '...[0-9]*s[0-9]*\(.*\)'` part=`expr $i : '...[0-9]*s[0-9]*\(.*\)'`
@ -461,9 +463,11 @@ ft*)
umask 77 umask 77
;; ;;
sd*|od*|da*|vn*|wd*|wfd*|fla*) ad*|sd*|od*|da*|vn*|wd*|afd*|wfd*|fla*)
umask $disk_umask umask $disk_umask
case $i in case $i in
ad*) name=ad; blk=30; chr=116;;
afd*) name=afd; blk=32; chr=118;;
fla*) name=fla; blk=28; chr=101;; fla*) name=fla; blk=28; chr=101;;
sd*) name=sd; blk=4; chr=13;; sd*) name=sd; blk=4; chr=13;;
od*) name=od; blk=4; chr=13;; od*) name=od; blk=4; chr=13;;
@ -473,7 +477,7 @@ sd*|od*|da*|vn*|wd*|wfd*|fla*)
wfd*) name=wfd; blk=1; chr=87;; wfd*) name=wfd; blk=1; chr=87;;
esac esac
case $i in case $i in
fla*|wfd*) afd*|fla*|wfd*)
unit=`expr $i : '...\(.*\)'` unit=`expr $i : '...\(.*\)'`
;; ;;
*) *)
@ -659,9 +663,27 @@ ch*)
umask 77 umask 77
;; ;;
cd*|mcd*|scd*) ast*)
umask 2 ;
unit=`expr $i : '...\(.*\)'`
chr=119
case $unit in
0|1|2|3)
mknod rast${unit} c $chr `expr $unit '*' 8 + 0`
chgrp operator rast${unit}
chmod 640 rast${unit}
;;
*)
echo bad unit for tape in: $i
;;
esac
umask 77
;;
acd*|cd*|mcd*|scd*)
umask $disk_umask umask $disk_umask
case $i in case $i in
acd*) units=`expr $i : '...\(.*\)'`; name=acd; blk=31; chr=117;;
cd*) units=`expr $i : '..\(.*\)'`; name=cd; blk=6; chr=15;; cd*) units=`expr $i : '..\(.*\)'`; name=cd; blk=6; chr=15;;
mcd*) units=`expr $i : '...\(.*\)'`; name=mcd; blk=7; chr=29;; mcd*) units=`expr $i : '...\(.*\)'`; name=mcd; blk=7; chr=29;;
scd*) units=`expr $i : '...\(.*\)'`; name=scd; blk=16; chr=45;; scd*) units=`expr $i : '...\(.*\)'`; name=scd; blk=16; chr=45;;
@ -720,23 +742,19 @@ matcd*)
umask 77 umask 77
;; ;;
acd?|wcd?) wcd?)
umask 2 ; umask 2 ;
unit=`expr $i : '...\(.*\)'` unit=`expr $i : '...\(.*\)'`
blk=19 blk=19
chr=69 chr=69
case $unit in case $unit in
0|1|2|3|4|5|6|7) 0|1|2|3|4|5|6|7)
mknod acd${unit}a b $blk `expr $unit '*' 8 + 0` mknod wcd${unit}a b $blk `expr $unit '*' 8 + 0`
ln -fs acd${unit}a wcd${unit}a mknod rwcd${unit}a c $chr `expr $unit '*' 8 + 0`
mknod racd${unit}a c $chr `expr $unit '*' 8 + 0` mknod wcd${unit}c b $blk `expr $unit '*' 8 + 2`
ln -fs racd${unit}a rwcd${unit}a mknod rwcd${unit}c c $chr `expr $unit '*' 8 + 2`
mknod acd${unit}c b $blk `expr $unit '*' 8 + 2` chgrp operator wcd${unit}[a-h] rwcd${unit}[a-h]
ln -fs acd${unit}c wcd${unit}c chmod 640 wcd${unit}[a-h] rwcd${unit}[a-h]
mknod racd${unit}c c $chr `expr $unit '*' 8 + 2`
ln -fs racd${unit}c rwcd${unit}c
chgrp operator acd${unit}[a-h] racd${unit}[a-h]
chmod 640 acd${unit}[a-h] racd${unit}[a-h]
;; ;;
*) *)
echo bad unit for disk in: $i echo bad unit for disk in: $i

View file

@ -121,7 +121,7 @@
# ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth) # ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth)
# kbd keyboard devices # kbd keyboard devices
# #
# $Id: MAKEDEV,v 1.191 1999/03/02 16:04:27 roger Exp $ # $Id: MAKEDEV,v 1.192 1999/03/05 23:08:45 gibbs Exp $
# #
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
@ -211,7 +211,7 @@ all)
sh MAKEDEV od0 # bdev, optical disk sh MAKEDEV od0 # bdev, optical disk
sh MAKEDEV wfd0 # bdev, LS-120 floppy sh MAKEDEV wfd0 # bdev, LS-120 floppy
sh MAKEDEV vn0 # bdev, virtual disk sh MAKEDEV vn0 # bdev, virtual disk
sh MAKEDEV cd0 matcd0 mcd0 scd0 acd0 # bdev, cdrom sh MAKEDEV cd0 matcd0 mcd0 scd0 wcd0 # bdev, cdrom
sh MAKEDEV ft0 sa0 wt0 wst0 # bdev, tape sh MAKEDEV ft0 sa0 wt0 wst0 # bdev, tape
sh MAKEDEV vty4 # cdev, virtual tty sh MAKEDEV vty4 # cdev, virtual tty
sh MAKEDEV cuaa0 cuaa1 cuaa2 cuaa3 # cdev, serial tty sh MAKEDEV cuaa0 cuaa1 cuaa2 cuaa3 # cdev, serial tty
@ -290,9 +290,11 @@ wt*)
;; ;;
# Individual slices. # Individual slices.
od*s*|sd*s*|da*s*|vn*s*|wd*s*|wfd*s*|fla*s*) ad*s*|od*s*|sd*s*|da*s*|vn*s*|wd*s*|afd*s*|wfd*s*|fla*s*)
umask $disk_umask umask $disk_umask
case $i in case $i in
ad*s*) name=ad; blk=30; chr=116;;
afd*s*) name=afd; blk=32; chr=118;;
fla*s*) name=fla; blk=28; chr=101;; fla*s*) name=fla; blk=28; chr=101;;
od*s*) name=od; blk=4; chr=13;; od*s*) name=od; blk=4; chr=13;;
sd*s*) name=sd; blk=4; chr=13;; sd*s*) name=sd; blk=4; chr=13;;
@ -302,7 +304,7 @@ od*s*|sd*s*|da*s*|vn*s*|wd*s*|wfd*s*|fla*s*)
wfd*s*) name=wfd; blk=1; chr=87;; wfd*s*) name=wfd; blk=1; chr=87;;
esac esac
case $i in case $i in
fla*s*|wfd*s*) afd*s*|fla*s*|wfd*s*)
unit=`expr $i : '...\([0-9]*\)s'` unit=`expr $i : '...\([0-9]*\)s'`
slice=`expr $i : '...[0-9]*s\([0-9]*\)'` slice=`expr $i : '...[0-9]*s\([0-9]*\)'`
part=`expr $i : '...[0-9]*s[0-9]*\(.*\)'` part=`expr $i : '...[0-9]*s[0-9]*\(.*\)'`
@ -461,9 +463,11 @@ ft*)
umask 77 umask 77
;; ;;
sd*|od*|da*|vn*|wd*|wfd*|fla*) ad*|sd*|od*|da*|vn*|wd*|afd*|wfd*|fla*)
umask $disk_umask umask $disk_umask
case $i in case $i in
ad*) name=ad; blk=30; chr=116;;
afd*) name=afd; blk=32; chr=118;;
fla*) name=fla; blk=28; chr=101;; fla*) name=fla; blk=28; chr=101;;
sd*) name=sd; blk=4; chr=13;; sd*) name=sd; blk=4; chr=13;;
od*) name=od; blk=4; chr=13;; od*) name=od; blk=4; chr=13;;
@ -473,7 +477,7 @@ sd*|od*|da*|vn*|wd*|wfd*|fla*)
wfd*) name=wfd; blk=1; chr=87;; wfd*) name=wfd; blk=1; chr=87;;
esac esac
case $i in case $i in
fla*|wfd*) afd*|fla*|wfd*)
unit=`expr $i : '...\(.*\)'` unit=`expr $i : '...\(.*\)'`
;; ;;
*) *)
@ -659,9 +663,27 @@ ch*)
umask 77 umask 77
;; ;;
cd*|mcd*|scd*) ast*)
umask 2 ;
unit=`expr $i : '...\(.*\)'`
chr=119
case $unit in
0|1|2|3)
mknod rast${unit} c $chr `expr $unit '*' 8 + 0`
chgrp operator rast${unit}
chmod 640 rast${unit}
;;
*)
echo bad unit for tape in: $i
;;
esac
umask 77
;;
acd*|cd*|mcd*|scd*)
umask $disk_umask umask $disk_umask
case $i in case $i in
acd*) units=`expr $i : '...\(.*\)'`; name=acd; blk=31; chr=117;;
cd*) units=`expr $i : '..\(.*\)'`; name=cd; blk=6; chr=15;; cd*) units=`expr $i : '..\(.*\)'`; name=cd; blk=6; chr=15;;
mcd*) units=`expr $i : '...\(.*\)'`; name=mcd; blk=7; chr=29;; mcd*) units=`expr $i : '...\(.*\)'`; name=mcd; blk=7; chr=29;;
scd*) units=`expr $i : '...\(.*\)'`; name=scd; blk=16; chr=45;; scd*) units=`expr $i : '...\(.*\)'`; name=scd; blk=16; chr=45;;
@ -720,23 +742,19 @@ matcd*)
umask 77 umask 77
;; ;;
acd?|wcd?) wcd?)
umask 2 ; umask 2 ;
unit=`expr $i : '...\(.*\)'` unit=`expr $i : '...\(.*\)'`
blk=19 blk=19
chr=69 chr=69
case $unit in case $unit in
0|1|2|3|4|5|6|7) 0|1|2|3|4|5|6|7)
mknod acd${unit}a b $blk `expr $unit '*' 8 + 0` mknod wcd${unit}a b $blk `expr $unit '*' 8 + 0`
ln -fs acd${unit}a wcd${unit}a mknod rwcd${unit}a c $chr `expr $unit '*' 8 + 0`
mknod racd${unit}a c $chr `expr $unit '*' 8 + 0` mknod wcd${unit}c b $blk `expr $unit '*' 8 + 2`
ln -fs racd${unit}a rwcd${unit}a mknod rwcd${unit}c c $chr `expr $unit '*' 8 + 2`
mknod acd${unit}c b $blk `expr $unit '*' 8 + 2` chgrp operator wcd${unit}[a-h] rwcd${unit}[a-h]
ln -fs acd${unit}c wcd${unit}c chmod 640 wcd${unit}[a-h] rwcd${unit}[a-h]
mknod racd${unit}c c $chr `expr $unit '*' 8 + 2`
ln -fs racd${unit}c rwcd${unit}c
chgrp operator acd${unit}[a-h] racd${unit}[a-h]
chmod 640 acd${unit}[a-h] racd${unit}[a-h]
;; ;;
*) *)
echo bad unit for disk in: $i echo bad unit for disk in: $i

View file

@ -11,7 +11,7 @@
# device lines is present in the ./LINT configuration file. If you are # device lines is present in the ./LINT configuration file. If you are
# in doubt as to the purpose or necessity of a line, check first in LINT. # in doubt as to the purpose or necessity of a line, check first in LINT.
# #
# $Id: GENERIC,v 1.153 1999/02/20 23:29:24 n_hibma Exp $ # $Id: GENERIC,v 1.154 1999/02/21 16:23:22 n_hibma Exp $
machine "i386" machine "i386"
cpu "I386_CPU" cpu "I386_CPU"
@ -71,7 +71,7 @@ disk wd3 at wdc1 drive 1
options ATAPI #Enable ATAPI support for IDE bus options ATAPI #Enable ATAPI support for IDE bus
options ATAPI_STATIC #Don't do it as an LKM options ATAPI_STATIC #Don't do it as an LKM
device acd0 #IDE CD-ROM device wcd0 #IDE CD-ROM
device wfd0 #IDE Floppy (e.g. LS-120) device wfd0 #IDE Floppy (e.g. LS-120)
# A single entry for any of these controllers (ncr, ahb, ahc) is # A single entry for any of these controllers (ncr, ahb, ahc) is

View file

@ -2,7 +2,7 @@
# LINT -- config file for checking all the sources, tries to pull in # LINT -- config file for checking all the sources, tries to pull in
# as much of the source tree as it can. # as much of the source tree as it can.
# #
# $Id: LINT,v 1.566 1999/03/13 06:32:06 grog Exp $ # $Id: LINT,v 1.567 1999/03/13 13:20:59 joerg Exp $
# #
# NB: You probably don't want to try running a kernel built from this # NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from # file. Instead, you should start from GENERIC, and add options from
@ -1118,7 +1118,7 @@ options ATAPI_STATIC #Don't do it as an LKM
options IDE_DELAY=8000 # Be optimistic about Joe IDE device options IDE_DELAY=8000 # Be optimistic about Joe IDE device
# IDE CD-ROM & CD-R/RW driver - requires wdc controller and ATAPI option # IDE CD-ROM & CD-R/RW driver - requires wdc controller and ATAPI option
device acd0 device wcd0
# IDE floppy driver - requires wdc controller and ATAPI option # IDE floppy driver - requires wdc controller and ATAPI option
device wfd0 device wfd0

View file

@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel, # This file tells config what files go into building a kernel,
# files marked standard are always included. # files marked standard are always included.
# #
# $Id: files.i386,v 1.227 1999/03/10 10:11:41 julian Exp $ # $Id: files.i386,v 1.228 1999/03/10 10:36:29 yokota Exp $
# #
# The long compile-with and dependency lines are required because of # The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and # limitations in config: backslash-newline doesn't work in strings, and
@ -275,7 +275,7 @@ i386/isa/tw.c optional tw device-driver
i386/isa/wd.c optional wdc device-driver i386/isa/wd.c optional wdc device-driver
i386/isa/wd.c optional wd device-driver i386/isa/wd.c optional wd device-driver
i386/isa/atapi.c optional atapi device-driver i386/isa/atapi.c optional atapi device-driver
i386/isa/atapi-cd.c optional acd device-driver i386/isa/atapi-cd.c optional wcd device-driver
i386/isa/wfd.c optional wfd device-driver i386/isa/wfd.c optional wfd device-driver
i386/isa/wst.c optional wst device-driver i386/isa/wst.c optional wst device-driver
i386/isa/wt.c optional wt device-driver i386/isa/wt.c optional wt device-driver

View file

@ -1,4 +1,4 @@
$Id: majors.i386,v 1.66 1999/03/08 23:31:04 jkh Exp $ $Id: majors.i386,v 1.67 1999/03/16 12:50:02 sos Exp $
Hopefully, this list will one day be obsoleted by DEVFS, but for now Hopefully, this list will one day be obsoleted by DEVFS, but for now
this is the current allocation of device major numbers. this is the current allocation of device major numbers.
@ -32,7 +32,7 @@ blkdev name comments
16 scd Sony CDROM interface 16 scd Sony CDROM interface
17 matcd Matsushita/Panasonic/Creative(SB) CDROM interface 17 matcd Matsushita/Panasonic/Creative(SB) CDROM interface
18 ata "device independent" ATA/IDE driver 18 ata "device independent" ATA/IDE driver
19 acdb ATAPI CDROM client of "wd" 19 wcdb ATAPI CDROM client of "wd"
20 ?? ATA disks 20 ?? ATA disks
21 ccd concatenated disk 21 ccd concatenated disk
22 gd Geometry disk. 22 gd Geometry disk.
@ -119,7 +119,7 @@ chrdev name comments
66 labpc National Instruments LabPC 66 labpc National Instruments LabPC
67 meteor Matrox Meteor video capture 67 meteor Matrox Meteor video capture
68 si Specialix SI/XIO (peter@freebsd.org) 68 si Specialix SI/XIO (peter@freebsd.org)
69 acd ATAPI CDROM client of "wd" 69 wcd ATAPI CDROM client of "wd"
71 asc AmiScan driver 71 asc AmiScan driver
72 stl Stallion (cd1400 based) (gerg@stallion.oz.au) 72 stl Stallion (cd1400 based) (gerg@stallion.oz.au)
73 ?? was qcam 73 ?? was qcam

View file

@ -11,7 +11,7 @@
# device lines is present in the ./LINT configuration file. If you are # device lines is present in the ./LINT configuration file. If you are
# in doubt as to the purpose or necessity of a line, check first in LINT. # in doubt as to the purpose or necessity of a line, check first in LINT.
# #
# $Id: GENERIC,v 1.153 1999/02/20 23:29:24 n_hibma Exp $ # $Id: GENERIC,v 1.154 1999/02/21 16:23:22 n_hibma Exp $
machine "i386" machine "i386"
cpu "I386_CPU" cpu "I386_CPU"
@ -71,7 +71,7 @@ disk wd3 at wdc1 drive 1
options ATAPI #Enable ATAPI support for IDE bus options ATAPI #Enable ATAPI support for IDE bus
options ATAPI_STATIC #Don't do it as an LKM options ATAPI_STATIC #Don't do it as an LKM
device acd0 #IDE CD-ROM device wcd0 #IDE CD-ROM
device wfd0 #IDE Floppy (e.g. LS-120) device wfd0 #IDE Floppy (e.g. LS-120)
# A single entry for any of these controllers (ncr, ahb, ahc) is # A single entry for any of these controllers (ncr, ahb, ahc) is

View file

@ -2,7 +2,7 @@
# LINT -- config file for checking all the sources, tries to pull in # LINT -- config file for checking all the sources, tries to pull in
# as much of the source tree as it can. # as much of the source tree as it can.
# #
# $Id: LINT,v 1.566 1999/03/13 06:32:06 grog Exp $ # $Id: LINT,v 1.567 1999/03/13 13:20:59 joerg Exp $
# #
# NB: You probably don't want to try running a kernel built from this # NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from # file. Instead, you should start from GENERIC, and add options from
@ -1118,7 +1118,7 @@ options ATAPI_STATIC #Don't do it as an LKM
options IDE_DELAY=8000 # Be optimistic about Joe IDE device options IDE_DELAY=8000 # Be optimistic about Joe IDE device
# IDE CD-ROM & CD-R/RW driver - requires wdc controller and ATAPI option # IDE CD-ROM & CD-R/RW driver - requires wdc controller and ATAPI option
device acd0 device wcd0
# IDE floppy driver - requires wdc controller and ATAPI option # IDE floppy driver - requires wdc controller and ATAPI option
device wfd0 device wfd0

View file

@ -2,7 +2,7 @@
# LINT -- config file for checking all the sources, tries to pull in # LINT -- config file for checking all the sources, tries to pull in
# as much of the source tree as it can. # as much of the source tree as it can.
# #
# $Id: LINT,v 1.566 1999/03/13 06:32:06 grog Exp $ # $Id: LINT,v 1.567 1999/03/13 13:20:59 joerg Exp $
# #
# NB: You probably don't want to try running a kernel built from this # NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from # file. Instead, you should start from GENERIC, and add options from
@ -1118,7 +1118,7 @@ options ATAPI_STATIC #Don't do it as an LKM
options IDE_DELAY=8000 # Be optimistic about Joe IDE device options IDE_DELAY=8000 # Be optimistic about Joe IDE device
# IDE CD-ROM & CD-R/RW driver - requires wdc controller and ATAPI option # IDE CD-ROM & CD-R/RW driver - requires wdc controller and ATAPI option
device acd0 device wcd0
# IDE floppy driver - requires wdc controller and ATAPI option # IDE floppy driver - requires wdc controller and ATAPI option
device wfd0 device wfd0

View file

@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel, # This file tells config what files go into building a kernel,
# files marked standard are always included. # files marked standard are always included.
# #
# $Id: files.i386,v 1.227 1999/03/10 10:11:41 julian Exp $ # $Id: files.i386,v 1.228 1999/03/10 10:36:29 yokota Exp $
# #
# The long compile-with and dependency lines are required because of # The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and # limitations in config: backslash-newline doesn't work in strings, and
@ -275,7 +275,7 @@ i386/isa/tw.c optional tw device-driver
i386/isa/wd.c optional wdc device-driver i386/isa/wd.c optional wdc device-driver
i386/isa/wd.c optional wd device-driver i386/isa/wd.c optional wd device-driver
i386/isa/atapi.c optional atapi device-driver i386/isa/atapi.c optional atapi device-driver
i386/isa/atapi-cd.c optional acd device-driver i386/isa/atapi-cd.c optional wcd device-driver
i386/isa/wfd.c optional wfd device-driver i386/isa/wfd.c optional wfd device-driver
i386/isa/wst.c optional wst device-driver i386/isa/wst.c optional wst device-driver
i386/isa/wt.c optional wt device-driver i386/isa/wt.c optional wt device-driver

View file

@ -1,4 +1,4 @@
$Id: majors.i386,v 1.66 1999/03/08 23:31:04 jkh Exp $ $Id: majors.i386,v 1.67 1999/03/16 12:50:02 sos Exp $
Hopefully, this list will one day be obsoleted by DEVFS, but for now Hopefully, this list will one day be obsoleted by DEVFS, but for now
this is the current allocation of device major numbers. this is the current allocation of device major numbers.
@ -32,7 +32,7 @@ blkdev name comments
16 scd Sony CDROM interface 16 scd Sony CDROM interface
17 matcd Matsushita/Panasonic/Creative(SB) CDROM interface 17 matcd Matsushita/Panasonic/Creative(SB) CDROM interface
18 ata "device independent" ATA/IDE driver 18 ata "device independent" ATA/IDE driver
19 acdb ATAPI CDROM client of "wd" 19 wcdb ATAPI CDROM client of "wd"
20 ?? ATA disks 20 ?? ATA disks
21 ccd concatenated disk 21 ccd concatenated disk
22 gd Geometry disk. 22 gd Geometry disk.
@ -119,7 +119,7 @@ chrdev name comments
66 labpc National Instruments LabPC 66 labpc National Instruments LabPC
67 meteor Matrox Meteor video capture 67 meteor Matrox Meteor video capture
68 si Specialix SI/XIO (peter@freebsd.org) 68 si Specialix SI/XIO (peter@freebsd.org)
69 acd ATAPI CDROM client of "wd" 69 wcd ATAPI CDROM client of "wd"
71 asc AmiScan driver 71 asc AmiScan driver
72 stl Stallion (cd1400 based) (gerg@stallion.oz.au) 72 stl Stallion (cd1400 based) (gerg@stallion.oz.au)
73 ?? was qcam 73 ?? was qcam

View file

@ -25,15 +25,15 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* $Id: atapi-cd.c,v 1.10 1999/01/31 23:08:47 sos Exp $ * $Id: atapi-cd.c,v 1.11 1999/02/10 00:03:32 ken Exp $
*/ */
#include "wdc.h" #include "wdc.h"
#include "acd.h" #include "wcd.h"
#include "opt_atapi.h" #include "opt_atapi.h"
#include "opt_devfs.h" #include "opt_devfs.h"
#if NACD > 0 && NWDC > 0 && defined(ATAPI) #if NWCD > 0 && NWDC > 0 && defined(ATAPI)
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -66,7 +66,7 @@ static d_strategy_t acdstrategy;
static struct cdevsw acd_cdevsw = { static struct cdevsw acd_cdevsw = {
acdopen, acdclose, acdread, acdwrite, acdopen, acdclose, acdread, acdwrite,
acdioctl, nostop, nullreset, nodevtotty, acdioctl, nostop, nullreset, nodevtotty,
seltrue, nommap, acdstrategy, "acd", seltrue, nommap, acdstrategy, "wcd",
NULL, -1, nodump, nopsize, NULL, -1, nodump, nopsize,
D_DISK, 0, -1 D_DISK, 0, -1
}; };
@ -141,19 +141,19 @@ acd_init_lun(struct atapi *ata, int unit, struct atapi_params *ap, int lun,
ptr->ra_devfs_token = ptr->ra_devfs_token =
devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0), devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0),
DV_CHR, UID_ROOT, GID_OPERATOR, 0640, DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
"racd%da", lun); "rwcd%da", lun);
ptr->rc_devfs_token = ptr->rc_devfs_token =
devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), devfs_add_devswf(&wcd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
DV_CHR, UID_ROOT, GID_OPERATOR, 0640, DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
"racd%dc", lun); "rwcd%dc", lun);
ptr->a_devfs_token = ptr->a_devfs_token =
devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0), devfs_add_devswf(&wcd_cdevsw, dkmakeminor(lun, 0, 0),
DV_BLK, UID_ROOT, GID_OPERATOR, 0640, DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
"acd%da", lun); "wcd%da", lun);
ptr->c_devfs_token = ptr->c_devfs_token =
devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), devfs_add_devswf(&wcd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
DV_BLK, UID_ROOT, GID_OPERATOR, 0640, DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
"acd%dc", lun); "wcd%dc", lun);
#endif #endif
return ptr; return ptr;
} }
@ -170,15 +170,15 @@ acdattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
int i, count; int i, count;
if (acdnlun >= NUNIT) { if (acdnlun >= NUNIT) {
printf("acd: too many units\n"); printf("wcd: too many units\n");
return 0; return 0;
} }
if (!atapi_request_immediate) { if (!atapi_request_immediate) {
printf("acd: configuration error, ATAPI code not present!\n"); printf("wcd: configuration error, ATAPI code not present!\n");
return 0; return 0;
} }
if ((cdp = acd_init_lun(ata, unit, ap, acdnlun, NULL)) == NULL) { if ((cdp = acd_init_lun(ata, unit, ap, acdnlun, NULL)) == NULL) {
printf("acd: out of memory\n"); printf("wcd: out of memory\n");
return 0; return 0;
} }
acdtab[acdnlun] = cdp; acdtab[acdnlun] = cdp;
@ -222,7 +222,7 @@ acdattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
chp = malloc(sizeof(struct changer), M_TEMP, M_NOWAIT); chp = malloc(sizeof(struct changer), M_TEMP, M_NOWAIT);
if (chp == NULL) { if (chp == NULL) {
printf("acd: out of memory\n"); printf("wcd: out of memory\n");
return 0; return 0;
} }
bzero(chp, sizeof(struct changer)); bzero(chp, sizeof(struct changer));
@ -247,22 +247,22 @@ acdattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
tmpcdp = acd_init_lun(ata, unit, ap, acdnlun, tmpcdp = acd_init_lun(ata, unit, ap, acdnlun,
cdp->device_stats); cdp->device_stats);
if (!tmpcdp) { if (!tmpcdp) {
printf("acd: out of memory\n"); printf("wcd: out of memory\n");
return 0; return 0;
} }
} }
tmpcdp->slot = i; tmpcdp->slot = i;
tmpcdp->changer_info = chp; tmpcdp->changer_info = chp;
printf("acd%d: changer slot %d %s\n", acdnlun, i, printf("wcd%d: changer slot %d %s\n", acdnlun, i,
(chp->slot[i].present ? "disk present" : "no disk")); (chp->slot[i].present ? "disk present" : "no disk"));
acdtab[acdnlun++] = tmpcdp; acdtab[acdnlun++] = tmpcdp;
} }
if (acdnlun >= NUNIT) { if (acdnlun >= NUNIT) {
printf("acd: too many units\n"); printf("wcd: too many units\n");
return 0; return 0;
} }
} }
sprintf(string, "acd%d-", cdp->lun); sprintf(string, "wcd%d-", cdp->lun);
devstat_add_entry(cdp->device_stats, string, tmpcdp->lun, DEV_BSIZE, devstat_add_entry(cdp->device_stats, string, tmpcdp->lun, DEV_BSIZE,
DEVSTAT_NO_ORDERED_TAGS, DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_IDE, DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_IDE,
@ -270,7 +270,7 @@ acdattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
} }
else { else {
acdnlun++; acdnlun++;
devstat_add_entry(cdp->device_stats, "acd", cdp->lun, DEV_BSIZE, devstat_add_entry(cdp->device_stats, "wcd", cdp->lun, DEV_BSIZE,
DEVSTAT_NO_ORDERED_TAGS, DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_IDE, DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_IDE,
DEVSTAT_PRIORITY_WCD); DEVSTAT_PRIORITY_WCD);
@ -284,14 +284,14 @@ acd_describe(struct acd *cdp)
int comma; int comma;
char *mechanism; char *mechanism;
printf("acd%d: drive speed ", cdp->lun); printf("wcd%d: drive speed ", cdp->lun);
if (cdp->cap.cur_speed != cdp->cap.max_speed) if (cdp->cap.cur_speed != cdp->cap.max_speed)
printf("%d - ", cdp->cap.cur_speed * 1000 / 1024); printf("%d - ", cdp->cap.cur_speed * 1000 / 1024);
printf("%dKB/sec", cdp->cap.max_speed * 1000 / 1024); printf("%dKB/sec", cdp->cap.max_speed * 1000 / 1024);
if (cdp->cap.buf_size) if (cdp->cap.buf_size)
printf(", %dKB cache\n", cdp->cap.buf_size); printf(", %dKB cache\n", cdp->cap.buf_size);
printf("acd%d: supported read types:", cdp->lun); printf("wcd%d: supported read types:", cdp->lun);
comma = 0; comma = 0;
if (cdp->cap.read_cdr) { if (cdp->cap.read_cdr) {
printf(" CD-R"); comma = 1; printf(" CD-R"); comma = 1;
@ -305,7 +305,7 @@ acd_describe(struct acd *cdp)
if (cdp->cap.method2) if (cdp->cap.method2)
printf("%s packet track", comma ? "," : ""); printf("%s packet track", comma ? "," : "");
if (cdp->cap.write_cdr || cdp->cap.write_cdrw) { if (cdp->cap.write_cdr || cdp->cap.write_cdrw) {
printf("\nacd%d: supported write types:", cdp->lun); printf("\nwcd%d: supported write types:", cdp->lun);
comma = 0; comma = 0;
if (cdp->cap.write_cdr) { if (cdp->cap.write_cdr) {
printf(" CD-R" ); comma = 1; printf(" CD-R" ); comma = 1;
@ -318,13 +318,13 @@ acd_describe(struct acd *cdp)
} }
} }
if (cdp->cap.audio_play) { if (cdp->cap.audio_play) {
printf("\nacd%d: Audio: ", cdp->lun); printf("\nwcd%d: Audio: ", cdp->lun);
if (cdp->cap.audio_play) if (cdp->cap.audio_play)
printf("play"); printf("play");
if (cdp->cap.max_vol_levels) if (cdp->cap.max_vol_levels)
printf(", %d volume levels", cdp->cap.max_vol_levels); printf(", %d volume levels", cdp->cap.max_vol_levels);
} }
printf("\nacd%d: Mechanism: ", cdp->lun); printf("\nwcd%d: Mechanism: ", cdp->lun);
switch (cdp->cap.mech) { switch (cdp->cap.mech) {
case MST_MECH_CADDY: case MST_MECH_CADDY:
mechanism = "caddy"; break; mechanism = "caddy"; break;
@ -345,7 +345,7 @@ acd_describe(struct acd *cdp)
printf("ejectable"); printf("ejectable");
if (cdp->cap.mech != MST_MECH_CHANGER) { if (cdp->cap.mech != MST_MECH_CHANGER) {
printf("\nacd%d: Medium: ", cdp->lun); printf("\nwcd%d: Medium: ", cdp->lun);
switch (cdp->cap.medium_type & MST_TYPE_MASK_HIGH) { switch (cdp->cap.medium_type & MST_TYPE_MASK_HIGH) {
case MST_CDROM: case MST_CDROM:
printf("CD-ROM "); break; printf("CD-ROM "); break;
@ -424,13 +424,13 @@ acdopen(dev_t dev, int flags, int fmt, struct proc *p)
if ((flags & FWRITE) != 0) { if ((flags & FWRITE) != 0) {
/* read/write */ /* read/write */
if (acd_rezero_unit(cdp)) { if (acd_rezero_unit(cdp)) {
printf("acd%d: rezero failed\n", lun); printf("wcd%d: rezero failed\n", lun);
return EIO; return EIO;
} }
} else { } else {
/* read only */ /* read only */
if (acd_read_toc(cdp) != 0) { if (acd_read_toc(cdp) != 0) {
printf("acd%d: read_toc failed\n", lun); printf("wcd%d: read_toc failed\n", lun);
/* return EIO; */ /* return EIO; */
} }
} }
@ -535,7 +535,7 @@ acd_start(struct acd *cdp)
if ((bp->b_flags & B_READ) == B_WRITE) { if ((bp->b_flags & B_READ) == B_WRITE) {
if ((cdp->flags & F_TRACK_PREPED) == 0) { if ((cdp->flags & F_TRACK_PREPED) == 0) {
if ((cdp->flags & F_TRACK_PREP) == 0) { if ((cdp->flags & F_TRACK_PREP) == 0) {
printf("acd%d: sequence error\n", cdp->lun); printf("wcd%d: sequence error\n", cdp->lun);
bp->b_error = EIO; bp->b_error = EIO;
bp->b_flags |= B_ERROR; bp->b_flags |= B_ERROR;
biodone(bp); biodone(bp);
@ -1064,7 +1064,7 @@ acdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
error = EINVAL; error = EINVAL;
else if ((cdp->flags & F_DISK_PREPED) == 0) { else if ((cdp->flags & F_DISK_PREPED) == 0) {
error = EINVAL; error = EINVAL;
printf("acd%d: sequence error (PREP_TRACK)\n", cdp->lun); printf("wcd%d: sequence error (PREP_TRACK)\n", cdp->lun);
} else { } else {
cdp->flags |= F_TRACK_PREP; cdp->flags |= F_TRACK_PREP;
cdp->preptrack = *w; cdp->preptrack = *w;
@ -1175,7 +1175,7 @@ acd_read_toc(struct acd *cdp)
if (cdp->info.volsize && cdp->toc.hdr.ending_track if (cdp->info.volsize && cdp->toc.hdr.ending_track
&& (cdp->flags & F_DEBUG)) { && (cdp->flags & F_DEBUG)) {
printf("acd%d: ", cdp->lun); printf("wcd%d: ", cdp->lun);
if (cdp->toc.tab[0].control & 4) if (cdp->toc.tab[0].control & 4)
printf("%ldMB ", cdp->info.volsize / 512); printf("%ldMB ", cdp->info.volsize / 512);
else else
@ -1254,8 +1254,8 @@ acd_eject(struct acd *cdp, int close)
if (close) if (close)
return 0; return 0;
tsleep((caddr_t) &lbolt, PRIBIO, "acdej1", 0); tsleep((caddr_t) &lbolt, PRIBIO, "wcdej1", 0);
tsleep((caddr_t) &lbolt, PRIBIO, "acdej2", 0); tsleep((caddr_t) &lbolt, PRIBIO, "wcdej2", 0);
acd_request_wait(cdp, ATAPI_PREVENT_ALLOW, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); acd_request_wait(cdp, ATAPI_PREVENT_ALLOW, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
cdp->flags &= ~F_LOCKED; cdp->flags &= ~F_LOCKED;
@ -1524,7 +1524,7 @@ atapi_dump(int ctrlr, int lun, char *label, void *data, int len)
printf ("\n"); printf ("\n");
} }
#ifdef ACD_MODULE #ifdef WCD_MODULE
#include <sys/exec.h> #include <sys/exec.h>
#include <sys/sysent.h> #include <sys/sysent.h>
#include <sys/lkm.h> #include <sys/lkm.h>
@ -1596,7 +1596,7 @@ acd_mod(struct lkm_table *lkmtp, int cmd, int ver)
return lkmdispatch(lkmtp, cmd); return lkmdispatch(lkmtp, cmd);
} }
#endif /* ACD_MODULE */ #endif /* WCD_MODULE */
static acd_devsw_installed = 0; static acd_devsw_installed = 0;
@ -1610,4 +1610,4 @@ acd_drvinit(void *unused)
} }
SYSINIT(acddev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE + CDEV_MAJOR, acd_drvinit, NULL) SYSINIT(acddev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE + CDEV_MAJOR, acd_drvinit, NULL)
#endif /* NACD && NWDC && ATAPI */ #endif /* NWCD && NWDC && ATAPI */

View file

@ -103,7 +103,7 @@
#include "opt_atapi.h" #include "opt_atapi.h"
#ifndef ATAPI_MODULE #ifndef ATAPI_MODULE
# include "acd.h" # include "wcd.h"
# include "wfd.h" # include "wfd.h"
# include "wst.h" # include "wst.h"
/* # include "wmd.h" -- add your driver here */ /* # include "wmd.h" -- add your driver here */
@ -293,7 +293,7 @@ int atapi_attach (int ctlr, int unit, int port)
} }
#endif #endif
case AT_TYPE_CDROM: /* CD-ROM device */ case AT_TYPE_CDROM: /* CD-ROM device */
#if NACD > 0 #if NWCD > 0
/* ATAPI CD-ROM & CD-R/RW drives */ /* ATAPI CD-ROM & CD-R/RW drives */
if (acdattach (ata, unit, ap, ata->debug) < 0) if (acdattach (ata, unit, ap, ata->debug) < 0)
break; break;

View file

@ -25,15 +25,15 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* $Id: atapi-cd.c,v 1.10 1999/01/31 23:08:47 sos Exp $ * $Id: atapi-cd.c,v 1.11 1999/02/10 00:03:32 ken Exp $
*/ */
#include "wdc.h" #include "wdc.h"
#include "acd.h" #include "wcd.h"
#include "opt_atapi.h" #include "opt_atapi.h"
#include "opt_devfs.h" #include "opt_devfs.h"
#if NACD > 0 && NWDC > 0 && defined(ATAPI) #if NWCD > 0 && NWDC > 0 && defined(ATAPI)
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -66,7 +66,7 @@ static d_strategy_t acdstrategy;
static struct cdevsw acd_cdevsw = { static struct cdevsw acd_cdevsw = {
acdopen, acdclose, acdread, acdwrite, acdopen, acdclose, acdread, acdwrite,
acdioctl, nostop, nullreset, nodevtotty, acdioctl, nostop, nullreset, nodevtotty,
seltrue, nommap, acdstrategy, "acd", seltrue, nommap, acdstrategy, "wcd",
NULL, -1, nodump, nopsize, NULL, -1, nodump, nopsize,
D_DISK, 0, -1 D_DISK, 0, -1
}; };
@ -141,19 +141,19 @@ acd_init_lun(struct atapi *ata, int unit, struct atapi_params *ap, int lun,
ptr->ra_devfs_token = ptr->ra_devfs_token =
devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0), devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0),
DV_CHR, UID_ROOT, GID_OPERATOR, 0640, DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
"racd%da", lun); "rwcd%da", lun);
ptr->rc_devfs_token = ptr->rc_devfs_token =
devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), devfs_add_devswf(&wcd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
DV_CHR, UID_ROOT, GID_OPERATOR, 0640, DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
"racd%dc", lun); "rwcd%dc", lun);
ptr->a_devfs_token = ptr->a_devfs_token =
devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0), devfs_add_devswf(&wcd_cdevsw, dkmakeminor(lun, 0, 0),
DV_BLK, UID_ROOT, GID_OPERATOR, 0640, DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
"acd%da", lun); "wcd%da", lun);
ptr->c_devfs_token = ptr->c_devfs_token =
devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), devfs_add_devswf(&wcd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
DV_BLK, UID_ROOT, GID_OPERATOR, 0640, DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
"acd%dc", lun); "wcd%dc", lun);
#endif #endif
return ptr; return ptr;
} }
@ -170,15 +170,15 @@ acdattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
int i, count; int i, count;
if (acdnlun >= NUNIT) { if (acdnlun >= NUNIT) {
printf("acd: too many units\n"); printf("wcd: too many units\n");
return 0; return 0;
} }
if (!atapi_request_immediate) { if (!atapi_request_immediate) {
printf("acd: configuration error, ATAPI code not present!\n"); printf("wcd: configuration error, ATAPI code not present!\n");
return 0; return 0;
} }
if ((cdp = acd_init_lun(ata, unit, ap, acdnlun, NULL)) == NULL) { if ((cdp = acd_init_lun(ata, unit, ap, acdnlun, NULL)) == NULL) {
printf("acd: out of memory\n"); printf("wcd: out of memory\n");
return 0; return 0;
} }
acdtab[acdnlun] = cdp; acdtab[acdnlun] = cdp;
@ -222,7 +222,7 @@ acdattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
chp = malloc(sizeof(struct changer), M_TEMP, M_NOWAIT); chp = malloc(sizeof(struct changer), M_TEMP, M_NOWAIT);
if (chp == NULL) { if (chp == NULL) {
printf("acd: out of memory\n"); printf("wcd: out of memory\n");
return 0; return 0;
} }
bzero(chp, sizeof(struct changer)); bzero(chp, sizeof(struct changer));
@ -247,22 +247,22 @@ acdattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
tmpcdp = acd_init_lun(ata, unit, ap, acdnlun, tmpcdp = acd_init_lun(ata, unit, ap, acdnlun,
cdp->device_stats); cdp->device_stats);
if (!tmpcdp) { if (!tmpcdp) {
printf("acd: out of memory\n"); printf("wcd: out of memory\n");
return 0; return 0;
} }
} }
tmpcdp->slot = i; tmpcdp->slot = i;
tmpcdp->changer_info = chp; tmpcdp->changer_info = chp;
printf("acd%d: changer slot %d %s\n", acdnlun, i, printf("wcd%d: changer slot %d %s\n", acdnlun, i,
(chp->slot[i].present ? "disk present" : "no disk")); (chp->slot[i].present ? "disk present" : "no disk"));
acdtab[acdnlun++] = tmpcdp; acdtab[acdnlun++] = tmpcdp;
} }
if (acdnlun >= NUNIT) { if (acdnlun >= NUNIT) {
printf("acd: too many units\n"); printf("wcd: too many units\n");
return 0; return 0;
} }
} }
sprintf(string, "acd%d-", cdp->lun); sprintf(string, "wcd%d-", cdp->lun);
devstat_add_entry(cdp->device_stats, string, tmpcdp->lun, DEV_BSIZE, devstat_add_entry(cdp->device_stats, string, tmpcdp->lun, DEV_BSIZE,
DEVSTAT_NO_ORDERED_TAGS, DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_IDE, DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_IDE,
@ -270,7 +270,7 @@ acdattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
} }
else { else {
acdnlun++; acdnlun++;
devstat_add_entry(cdp->device_stats, "acd", cdp->lun, DEV_BSIZE, devstat_add_entry(cdp->device_stats, "wcd", cdp->lun, DEV_BSIZE,
DEVSTAT_NO_ORDERED_TAGS, DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_IDE, DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_IDE,
DEVSTAT_PRIORITY_WCD); DEVSTAT_PRIORITY_WCD);
@ -284,14 +284,14 @@ acd_describe(struct acd *cdp)
int comma; int comma;
char *mechanism; char *mechanism;
printf("acd%d: drive speed ", cdp->lun); printf("wcd%d: drive speed ", cdp->lun);
if (cdp->cap.cur_speed != cdp->cap.max_speed) if (cdp->cap.cur_speed != cdp->cap.max_speed)
printf("%d - ", cdp->cap.cur_speed * 1000 / 1024); printf("%d - ", cdp->cap.cur_speed * 1000 / 1024);
printf("%dKB/sec", cdp->cap.max_speed * 1000 / 1024); printf("%dKB/sec", cdp->cap.max_speed * 1000 / 1024);
if (cdp->cap.buf_size) if (cdp->cap.buf_size)
printf(", %dKB cache\n", cdp->cap.buf_size); printf(", %dKB cache\n", cdp->cap.buf_size);
printf("acd%d: supported read types:", cdp->lun); printf("wcd%d: supported read types:", cdp->lun);
comma = 0; comma = 0;
if (cdp->cap.read_cdr) { if (cdp->cap.read_cdr) {
printf(" CD-R"); comma = 1; printf(" CD-R"); comma = 1;
@ -305,7 +305,7 @@ acd_describe(struct acd *cdp)
if (cdp->cap.method2) if (cdp->cap.method2)
printf("%s packet track", comma ? "," : ""); printf("%s packet track", comma ? "," : "");
if (cdp->cap.write_cdr || cdp->cap.write_cdrw) { if (cdp->cap.write_cdr || cdp->cap.write_cdrw) {
printf("\nacd%d: supported write types:", cdp->lun); printf("\nwcd%d: supported write types:", cdp->lun);
comma = 0; comma = 0;
if (cdp->cap.write_cdr) { if (cdp->cap.write_cdr) {
printf(" CD-R" ); comma = 1; printf(" CD-R" ); comma = 1;
@ -318,13 +318,13 @@ acd_describe(struct acd *cdp)
} }
} }
if (cdp->cap.audio_play) { if (cdp->cap.audio_play) {
printf("\nacd%d: Audio: ", cdp->lun); printf("\nwcd%d: Audio: ", cdp->lun);
if (cdp->cap.audio_play) if (cdp->cap.audio_play)
printf("play"); printf("play");
if (cdp->cap.max_vol_levels) if (cdp->cap.max_vol_levels)
printf(", %d volume levels", cdp->cap.max_vol_levels); printf(", %d volume levels", cdp->cap.max_vol_levels);
} }
printf("\nacd%d: Mechanism: ", cdp->lun); printf("\nwcd%d: Mechanism: ", cdp->lun);
switch (cdp->cap.mech) { switch (cdp->cap.mech) {
case MST_MECH_CADDY: case MST_MECH_CADDY:
mechanism = "caddy"; break; mechanism = "caddy"; break;
@ -345,7 +345,7 @@ acd_describe(struct acd *cdp)
printf("ejectable"); printf("ejectable");
if (cdp->cap.mech != MST_MECH_CHANGER) { if (cdp->cap.mech != MST_MECH_CHANGER) {
printf("\nacd%d: Medium: ", cdp->lun); printf("\nwcd%d: Medium: ", cdp->lun);
switch (cdp->cap.medium_type & MST_TYPE_MASK_HIGH) { switch (cdp->cap.medium_type & MST_TYPE_MASK_HIGH) {
case MST_CDROM: case MST_CDROM:
printf("CD-ROM "); break; printf("CD-ROM "); break;
@ -424,13 +424,13 @@ acdopen(dev_t dev, int flags, int fmt, struct proc *p)
if ((flags & FWRITE) != 0) { if ((flags & FWRITE) != 0) {
/* read/write */ /* read/write */
if (acd_rezero_unit(cdp)) { if (acd_rezero_unit(cdp)) {
printf("acd%d: rezero failed\n", lun); printf("wcd%d: rezero failed\n", lun);
return EIO; return EIO;
} }
} else { } else {
/* read only */ /* read only */
if (acd_read_toc(cdp) != 0) { if (acd_read_toc(cdp) != 0) {
printf("acd%d: read_toc failed\n", lun); printf("wcd%d: read_toc failed\n", lun);
/* return EIO; */ /* return EIO; */
} }
} }
@ -535,7 +535,7 @@ acd_start(struct acd *cdp)
if ((bp->b_flags & B_READ) == B_WRITE) { if ((bp->b_flags & B_READ) == B_WRITE) {
if ((cdp->flags & F_TRACK_PREPED) == 0) { if ((cdp->flags & F_TRACK_PREPED) == 0) {
if ((cdp->flags & F_TRACK_PREP) == 0) { if ((cdp->flags & F_TRACK_PREP) == 0) {
printf("acd%d: sequence error\n", cdp->lun); printf("wcd%d: sequence error\n", cdp->lun);
bp->b_error = EIO; bp->b_error = EIO;
bp->b_flags |= B_ERROR; bp->b_flags |= B_ERROR;
biodone(bp); biodone(bp);
@ -1064,7 +1064,7 @@ acdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
error = EINVAL; error = EINVAL;
else if ((cdp->flags & F_DISK_PREPED) == 0) { else if ((cdp->flags & F_DISK_PREPED) == 0) {
error = EINVAL; error = EINVAL;
printf("acd%d: sequence error (PREP_TRACK)\n", cdp->lun); printf("wcd%d: sequence error (PREP_TRACK)\n", cdp->lun);
} else { } else {
cdp->flags |= F_TRACK_PREP; cdp->flags |= F_TRACK_PREP;
cdp->preptrack = *w; cdp->preptrack = *w;
@ -1175,7 +1175,7 @@ acd_read_toc(struct acd *cdp)
if (cdp->info.volsize && cdp->toc.hdr.ending_track if (cdp->info.volsize && cdp->toc.hdr.ending_track
&& (cdp->flags & F_DEBUG)) { && (cdp->flags & F_DEBUG)) {
printf("acd%d: ", cdp->lun); printf("wcd%d: ", cdp->lun);
if (cdp->toc.tab[0].control & 4) if (cdp->toc.tab[0].control & 4)
printf("%ldMB ", cdp->info.volsize / 512); printf("%ldMB ", cdp->info.volsize / 512);
else else
@ -1254,8 +1254,8 @@ acd_eject(struct acd *cdp, int close)
if (close) if (close)
return 0; return 0;
tsleep((caddr_t) &lbolt, PRIBIO, "acdej1", 0); tsleep((caddr_t) &lbolt, PRIBIO, "wcdej1", 0);
tsleep((caddr_t) &lbolt, PRIBIO, "acdej2", 0); tsleep((caddr_t) &lbolt, PRIBIO, "wcdej2", 0);
acd_request_wait(cdp, ATAPI_PREVENT_ALLOW, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); acd_request_wait(cdp, ATAPI_PREVENT_ALLOW, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
cdp->flags &= ~F_LOCKED; cdp->flags &= ~F_LOCKED;
@ -1524,7 +1524,7 @@ atapi_dump(int ctrlr, int lun, char *label, void *data, int len)
printf ("\n"); printf ("\n");
} }
#ifdef ACD_MODULE #ifdef WCD_MODULE
#include <sys/exec.h> #include <sys/exec.h>
#include <sys/sysent.h> #include <sys/sysent.h>
#include <sys/lkm.h> #include <sys/lkm.h>
@ -1596,7 +1596,7 @@ acd_mod(struct lkm_table *lkmtp, int cmd, int ver)
return lkmdispatch(lkmtp, cmd); return lkmdispatch(lkmtp, cmd);
} }
#endif /* ACD_MODULE */ #endif /* WCD_MODULE */
static acd_devsw_installed = 0; static acd_devsw_installed = 0;
@ -1610,4 +1610,4 @@ acd_drvinit(void *unused)
} }
SYSINIT(acddev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE + CDEV_MAJOR, acd_drvinit, NULL) SYSINIT(acddev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE + CDEV_MAJOR, acd_drvinit, NULL)
#endif /* NACD && NWDC && ATAPI */ #endif /* NWCD && NWDC && ATAPI */

View file

@ -25,15 +25,15 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* $Id: atapi-cd.c,v 1.10 1999/01/31 23:08:47 sos Exp $ * $Id: atapi-cd.c,v 1.11 1999/02/10 00:03:32 ken Exp $
*/ */
#include "wdc.h" #include "wdc.h"
#include "acd.h" #include "wcd.h"
#include "opt_atapi.h" #include "opt_atapi.h"
#include "opt_devfs.h" #include "opt_devfs.h"
#if NACD > 0 && NWDC > 0 && defined(ATAPI) #if NWCD > 0 && NWDC > 0 && defined(ATAPI)
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -66,7 +66,7 @@ static d_strategy_t acdstrategy;
static struct cdevsw acd_cdevsw = { static struct cdevsw acd_cdevsw = {
acdopen, acdclose, acdread, acdwrite, acdopen, acdclose, acdread, acdwrite,
acdioctl, nostop, nullreset, nodevtotty, acdioctl, nostop, nullreset, nodevtotty,
seltrue, nommap, acdstrategy, "acd", seltrue, nommap, acdstrategy, "wcd",
NULL, -1, nodump, nopsize, NULL, -1, nodump, nopsize,
D_DISK, 0, -1 D_DISK, 0, -1
}; };
@ -141,19 +141,19 @@ acd_init_lun(struct atapi *ata, int unit, struct atapi_params *ap, int lun,
ptr->ra_devfs_token = ptr->ra_devfs_token =
devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0), devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0),
DV_CHR, UID_ROOT, GID_OPERATOR, 0640, DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
"racd%da", lun); "rwcd%da", lun);
ptr->rc_devfs_token = ptr->rc_devfs_token =
devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), devfs_add_devswf(&wcd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
DV_CHR, UID_ROOT, GID_OPERATOR, 0640, DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
"racd%dc", lun); "rwcd%dc", lun);
ptr->a_devfs_token = ptr->a_devfs_token =
devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0), devfs_add_devswf(&wcd_cdevsw, dkmakeminor(lun, 0, 0),
DV_BLK, UID_ROOT, GID_OPERATOR, 0640, DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
"acd%da", lun); "wcd%da", lun);
ptr->c_devfs_token = ptr->c_devfs_token =
devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), devfs_add_devswf(&wcd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
DV_BLK, UID_ROOT, GID_OPERATOR, 0640, DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
"acd%dc", lun); "wcd%dc", lun);
#endif #endif
return ptr; return ptr;
} }
@ -170,15 +170,15 @@ acdattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
int i, count; int i, count;
if (acdnlun >= NUNIT) { if (acdnlun >= NUNIT) {
printf("acd: too many units\n"); printf("wcd: too many units\n");
return 0; return 0;
} }
if (!atapi_request_immediate) { if (!atapi_request_immediate) {
printf("acd: configuration error, ATAPI code not present!\n"); printf("wcd: configuration error, ATAPI code not present!\n");
return 0; return 0;
} }
if ((cdp = acd_init_lun(ata, unit, ap, acdnlun, NULL)) == NULL) { if ((cdp = acd_init_lun(ata, unit, ap, acdnlun, NULL)) == NULL) {
printf("acd: out of memory\n"); printf("wcd: out of memory\n");
return 0; return 0;
} }
acdtab[acdnlun] = cdp; acdtab[acdnlun] = cdp;
@ -222,7 +222,7 @@ acdattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
chp = malloc(sizeof(struct changer), M_TEMP, M_NOWAIT); chp = malloc(sizeof(struct changer), M_TEMP, M_NOWAIT);
if (chp == NULL) { if (chp == NULL) {
printf("acd: out of memory\n"); printf("wcd: out of memory\n");
return 0; return 0;
} }
bzero(chp, sizeof(struct changer)); bzero(chp, sizeof(struct changer));
@ -247,22 +247,22 @@ acdattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
tmpcdp = acd_init_lun(ata, unit, ap, acdnlun, tmpcdp = acd_init_lun(ata, unit, ap, acdnlun,
cdp->device_stats); cdp->device_stats);
if (!tmpcdp) { if (!tmpcdp) {
printf("acd: out of memory\n"); printf("wcd: out of memory\n");
return 0; return 0;
} }
} }
tmpcdp->slot = i; tmpcdp->slot = i;
tmpcdp->changer_info = chp; tmpcdp->changer_info = chp;
printf("acd%d: changer slot %d %s\n", acdnlun, i, printf("wcd%d: changer slot %d %s\n", acdnlun, i,
(chp->slot[i].present ? "disk present" : "no disk")); (chp->slot[i].present ? "disk present" : "no disk"));
acdtab[acdnlun++] = tmpcdp; acdtab[acdnlun++] = tmpcdp;
} }
if (acdnlun >= NUNIT) { if (acdnlun >= NUNIT) {
printf("acd: too many units\n"); printf("wcd: too many units\n");
return 0; return 0;
} }
} }
sprintf(string, "acd%d-", cdp->lun); sprintf(string, "wcd%d-", cdp->lun);
devstat_add_entry(cdp->device_stats, string, tmpcdp->lun, DEV_BSIZE, devstat_add_entry(cdp->device_stats, string, tmpcdp->lun, DEV_BSIZE,
DEVSTAT_NO_ORDERED_TAGS, DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_IDE, DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_IDE,
@ -270,7 +270,7 @@ acdattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug)
} }
else { else {
acdnlun++; acdnlun++;
devstat_add_entry(cdp->device_stats, "acd", cdp->lun, DEV_BSIZE, devstat_add_entry(cdp->device_stats, "wcd", cdp->lun, DEV_BSIZE,
DEVSTAT_NO_ORDERED_TAGS, DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_IDE, DEVSTAT_TYPE_CDROM | DEVSTAT_TYPE_IF_IDE,
DEVSTAT_PRIORITY_WCD); DEVSTAT_PRIORITY_WCD);
@ -284,14 +284,14 @@ acd_describe(struct acd *cdp)
int comma; int comma;
char *mechanism; char *mechanism;
printf("acd%d: drive speed ", cdp->lun); printf("wcd%d: drive speed ", cdp->lun);
if (cdp->cap.cur_speed != cdp->cap.max_speed) if (cdp->cap.cur_speed != cdp->cap.max_speed)
printf("%d - ", cdp->cap.cur_speed * 1000 / 1024); printf("%d - ", cdp->cap.cur_speed * 1000 / 1024);
printf("%dKB/sec", cdp->cap.max_speed * 1000 / 1024); printf("%dKB/sec", cdp->cap.max_speed * 1000 / 1024);
if (cdp->cap.buf_size) if (cdp->cap.buf_size)
printf(", %dKB cache\n", cdp->cap.buf_size); printf(", %dKB cache\n", cdp->cap.buf_size);
printf("acd%d: supported read types:", cdp->lun); printf("wcd%d: supported read types:", cdp->lun);
comma = 0; comma = 0;
if (cdp->cap.read_cdr) { if (cdp->cap.read_cdr) {
printf(" CD-R"); comma = 1; printf(" CD-R"); comma = 1;
@ -305,7 +305,7 @@ acd_describe(struct acd *cdp)
if (cdp->cap.method2) if (cdp->cap.method2)
printf("%s packet track", comma ? "," : ""); printf("%s packet track", comma ? "," : "");
if (cdp->cap.write_cdr || cdp->cap.write_cdrw) { if (cdp->cap.write_cdr || cdp->cap.write_cdrw) {
printf("\nacd%d: supported write types:", cdp->lun); printf("\nwcd%d: supported write types:", cdp->lun);
comma = 0; comma = 0;
if (cdp->cap.write_cdr) { if (cdp->cap.write_cdr) {
printf(" CD-R" ); comma = 1; printf(" CD-R" ); comma = 1;
@ -318,13 +318,13 @@ acd_describe(struct acd *cdp)
} }
} }
if (cdp->cap.audio_play) { if (cdp->cap.audio_play) {
printf("\nacd%d: Audio: ", cdp->lun); printf("\nwcd%d: Audio: ", cdp->lun);
if (cdp->cap.audio_play) if (cdp->cap.audio_play)
printf("play"); printf("play");
if (cdp->cap.max_vol_levels) if (cdp->cap.max_vol_levels)
printf(", %d volume levels", cdp->cap.max_vol_levels); printf(", %d volume levels", cdp->cap.max_vol_levels);
} }
printf("\nacd%d: Mechanism: ", cdp->lun); printf("\nwcd%d: Mechanism: ", cdp->lun);
switch (cdp->cap.mech) { switch (cdp->cap.mech) {
case MST_MECH_CADDY: case MST_MECH_CADDY:
mechanism = "caddy"; break; mechanism = "caddy"; break;
@ -345,7 +345,7 @@ acd_describe(struct acd *cdp)
printf("ejectable"); printf("ejectable");
if (cdp->cap.mech != MST_MECH_CHANGER) { if (cdp->cap.mech != MST_MECH_CHANGER) {
printf("\nacd%d: Medium: ", cdp->lun); printf("\nwcd%d: Medium: ", cdp->lun);
switch (cdp->cap.medium_type & MST_TYPE_MASK_HIGH) { switch (cdp->cap.medium_type & MST_TYPE_MASK_HIGH) {
case MST_CDROM: case MST_CDROM:
printf("CD-ROM "); break; printf("CD-ROM "); break;
@ -424,13 +424,13 @@ acdopen(dev_t dev, int flags, int fmt, struct proc *p)
if ((flags & FWRITE) != 0) { if ((flags & FWRITE) != 0) {
/* read/write */ /* read/write */
if (acd_rezero_unit(cdp)) { if (acd_rezero_unit(cdp)) {
printf("acd%d: rezero failed\n", lun); printf("wcd%d: rezero failed\n", lun);
return EIO; return EIO;
} }
} else { } else {
/* read only */ /* read only */
if (acd_read_toc(cdp) != 0) { if (acd_read_toc(cdp) != 0) {
printf("acd%d: read_toc failed\n", lun); printf("wcd%d: read_toc failed\n", lun);
/* return EIO; */ /* return EIO; */
} }
} }
@ -535,7 +535,7 @@ acd_start(struct acd *cdp)
if ((bp->b_flags & B_READ) == B_WRITE) { if ((bp->b_flags & B_READ) == B_WRITE) {
if ((cdp->flags & F_TRACK_PREPED) == 0) { if ((cdp->flags & F_TRACK_PREPED) == 0) {
if ((cdp->flags & F_TRACK_PREP) == 0) { if ((cdp->flags & F_TRACK_PREP) == 0) {
printf("acd%d: sequence error\n", cdp->lun); printf("wcd%d: sequence error\n", cdp->lun);
bp->b_error = EIO; bp->b_error = EIO;
bp->b_flags |= B_ERROR; bp->b_flags |= B_ERROR;
biodone(bp); biodone(bp);
@ -1064,7 +1064,7 @@ acdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
error = EINVAL; error = EINVAL;
else if ((cdp->flags & F_DISK_PREPED) == 0) { else if ((cdp->flags & F_DISK_PREPED) == 0) {
error = EINVAL; error = EINVAL;
printf("acd%d: sequence error (PREP_TRACK)\n", cdp->lun); printf("wcd%d: sequence error (PREP_TRACK)\n", cdp->lun);
} else { } else {
cdp->flags |= F_TRACK_PREP; cdp->flags |= F_TRACK_PREP;
cdp->preptrack = *w; cdp->preptrack = *w;
@ -1175,7 +1175,7 @@ acd_read_toc(struct acd *cdp)
if (cdp->info.volsize && cdp->toc.hdr.ending_track if (cdp->info.volsize && cdp->toc.hdr.ending_track
&& (cdp->flags & F_DEBUG)) { && (cdp->flags & F_DEBUG)) {
printf("acd%d: ", cdp->lun); printf("wcd%d: ", cdp->lun);
if (cdp->toc.tab[0].control & 4) if (cdp->toc.tab[0].control & 4)
printf("%ldMB ", cdp->info.volsize / 512); printf("%ldMB ", cdp->info.volsize / 512);
else else
@ -1254,8 +1254,8 @@ acd_eject(struct acd *cdp, int close)
if (close) if (close)
return 0; return 0;
tsleep((caddr_t) &lbolt, PRIBIO, "acdej1", 0); tsleep((caddr_t) &lbolt, PRIBIO, "wcdej1", 0);
tsleep((caddr_t) &lbolt, PRIBIO, "acdej2", 0); tsleep((caddr_t) &lbolt, PRIBIO, "wcdej2", 0);
acd_request_wait(cdp, ATAPI_PREVENT_ALLOW, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); acd_request_wait(cdp, ATAPI_PREVENT_ALLOW, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
cdp->flags &= ~F_LOCKED; cdp->flags &= ~F_LOCKED;
@ -1524,7 +1524,7 @@ atapi_dump(int ctrlr, int lun, char *label, void *data, int len)
printf ("\n"); printf ("\n");
} }
#ifdef ACD_MODULE #ifdef WCD_MODULE
#include <sys/exec.h> #include <sys/exec.h>
#include <sys/sysent.h> #include <sys/sysent.h>
#include <sys/lkm.h> #include <sys/lkm.h>
@ -1596,7 +1596,7 @@ acd_mod(struct lkm_table *lkmtp, int cmd, int ver)
return lkmdispatch(lkmtp, cmd); return lkmdispatch(lkmtp, cmd);
} }
#endif /* ACD_MODULE */ #endif /* WCD_MODULE */
static acd_devsw_installed = 0; static acd_devsw_installed = 0;
@ -1610,4 +1610,4 @@ acd_drvinit(void *unused)
} }
SYSINIT(acddev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE + CDEV_MAJOR, acd_drvinit, NULL) SYSINIT(acddev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE + CDEV_MAJOR, acd_drvinit, NULL)
#endif /* NACD && NWDC && ATAPI */ #endif /* NWCD && NWDC && ATAPI */