Subject: OTHERS/dhv (DHV-11 driver) moved into supported catagory Index: pdpuba/dhv.c,OTHERS/dhv,sys/conf,others... 2.11BSD Description: The OTHERS/dhv driver does a much better job of managing the silo than the pdpuba/dhu.c driver. The DHV lacks the silo alarm capability of the DHU, an interrupt is only generated when a character is placed in an empty silo. It is quite easy to enter into a interrupt per character mode with a DHV when doing a kermit file transfer, resulting in a lowered file transfer rate as well as increased system overhead. Also the DHV-11 has only 8 channels per board versus the 16 of the DHU-11, using a driver specifically tailored for the DHV saves ~500 bytes in kernel D space per DHV controller. Another feature of the DHV driver is the ability to use the hardware XON/XOFF feature (bit 6 in the minor device number). This will likely not be used very much, but the feature is present. Repeat-By: Use a DHV to perform either a UUCP or KERMIT file transfer, note (using 'vmstat') the high number of interrupts per second as well as high percentage of time spent in the 'system' state. Fix: Below are updates to add the DHV as a supported device. The changes to the dhv.c driver are: 1) add the "uio" (readv/writev) support 2) change the softcarrier behaviour (0200 in the minor device number) to be like that of the other serial drivers (dh,dz, etc). 3) change the autoconfig entry to "dhvattach" from "dvattach". First, move the OTHERS/dhv modules to the right place and remove the OTHERS/dhv directory. mv /sys/OTHERS/dhv/dhv.c /sys/pdpuba/dhv.c mv /sys/OTHERS/dhv/dhvreg.h /sys/pdpuba/dhvreg.h mv /sys/OTHERS/dhv/dhvauto.c /sys/autoconfig/dhvauto.c rm -r /sys/OTHERS/dhv Then apply the enclosed patches to the following files: /dev/MAKEDEV /usr/src/sys/autoconfig/Makefile /usr/src/sys/autoconfig/uprobe.c /usr/src/sys/conf/GENERIC /usr/src/sys/conf/KAZOO /usr/src/sys/conf/Make.nsunix /usr/src/sys/conf/Make.pdpuba /usr/src/sys/conf/Make.sunix /usr/src/sys/conf/Make.unix /usr/src/sys/conf/VAX /usr/src/sys/conf/config /usr/src/sys/pdp/conf.c /usr/src/sys/pdp/scb.s /usr/src/sys/pdpdist/dtab /usr/src/sys/pdpuba/dhv.c Finally, if you do not wish to re-configure the kernel, the 'config' file and Makefiles for the current kernel should be edited. There are two possibilities: 1) there are no DHV or DHU devices present in the system, in which case the Makefile(s) and dhv.h file are simply created with NDHV being 0. 2) there are DHV units present and you wish to change from the dhu.c driver to the newly incorporated dhv.c driver. For example, if your kernel config file is FOOBAR, then: Scenario 1 (no DHV/DHU units present): 1) cd /sys/conf 2) edit FOOBAR and add the line: NDHV 0 # DHV11 just below the line starting with "NDHU". 3) cd ../FOOBAR create the file dhv.h and place the line #define NDHV 0 in it. 4) edit the makefiles Make.pdpuba and Makefile, add the entry "dhv.o" beside the entry for "dhu.o" (use the patches below as guides, it should be easy to see what is going on) 5) recompile and install autoconfig: cd /sys/autoconfig make all make install make clean 6) (optional) recompile and install the kernel. This will incorporate the changes to the cdevsw[] table. Scenario 2 (DHV units present and the switch from dhu.c to dhv.c is desired): 1) cd /sys/conf 2) edit FOOBAR, look for the line which begins: NDHU X (where X is the number of DHV controllers) change the NDHU line to be: NDHU 0 # DHU11 and add (immediately below the above line) NDHV X # DHV11 3) cd ../FOOBAR cp dhu.h dhv.h edit dhv.h, changing NDHU to NDHV 4) edit Makefile and Makefile.pdpuba, adding the "dhv.o" just after "dhu.o". Use the supplied examples as a guide. 5) recompile and install a new kernel. The DHV driver is slightly larger in text space, it may be necessary to adjust the overlay structure of the kernel. 6) recompile and install autoconfig: cd /sys/autoconfig make all make install make clean 7) make the new device nodes (the dhv driver has been assigned major device number 24): cd /dev ls -l ttyS? [ttyT? ... ] (depending how many DHV controllers are present) rm ttyS? [ttyT? ... } ./MAKEDEV dhv0 [ dhv1 ... ] NOTE: the dhv.c driver has been altered to behave like the other serial line device drivers (dhu, dh, dz, etc) - 128 must be added to the minor device number to indicate "soft carrier" (direct connect, no modem control). 8) edit /etc/dtab and replace "dhu" with "dhv", and "du" with "dhv". DHU-11s were identified by lines beginning with "du" but the interrupt routine names began with "dhu". Example: Before: du ? 160020 310 5 dhurint dhuxint # dhu11 terminal mux After: dhv ? 160020 310 5 dhvrint dhvxint # dhv terminal mux 9) reboot the system The GENERIC kernel can either be reconfigured (rm -r /sys/GENERIC; cd /sys/conf; ./config GENERIC) OR the same adjustments made to its Makefile + Make.pdpuba (to add the dhv.o entry) and dhv.h. Other kernel config files and directories will also need to be updated. The DHV driver uses the same /dev node names (ttyS?, ttyT?, etc). It would be possible to have both DHU and DHV drivers present, although it is unknown why such a thing would be done. In that event the commands to set up the /dev entries will have to be entered manually. ---------------------------------------------------------------------------- *** /dev/MAKEDEV.old Sat May 25 18:17:57 1991 --- /dev/MAKEDEV Sun Dec 22 17:16:18 1991 *************** *** 29,34 **** --- 29,35 ---- # dmf* unibus dmf32 # dhu* unibus dhu11 # dmz* unibus dmz32 + # dhv* qbus dhv11 # Pseudo terminals: # pty* set of 16 master and slave pseudo terminals # Printers: *************** *** 215,221 **** # # we may want dmz and dmf someday... # dhu*|dh*|dmf*|dmz*) ! dhu*|dh*) case $i in # dmz*) name=dmz; major=37; count=24; # unit=`expr $i : "$name\(.*\)"` --- 216,222 ---- # # we may want dmz and dmf someday... # dhu*|dh*|dmf*|dmz*) ! dhv*|dhu*|dh*) case $i in # dmz*) name=dmz; major=37; count=24; # unit=`expr $i : "$name\(.*\)"` *************** *** 231,236 **** --- 232,244 ---- # 4) ch=F ;; 5) ch=G ;; 6) ch=H ;; 7) ch=I ;; # *) echo bad unit for $name in: $i ;; # esac;; + dhv*) name=dhv; major=24; count=8; + unit=`expr $i : "$name\(.*\)"`; + case $unit in + 0) ch=S ;; 1) ch=T ;; 2) ch=U ;; 3) ch=V ;; + 4) ch=W ;; 5) ch=X ;; 6) ch=Y ;; 7) ch=Z ;; + *) echo bad unit for $name in: $i ;; + esac;; dhu*) name=dhu; major=4; count=16; unit=`expr $i : "$name\(.*\)"`; case $unit in *** /usr/src/sys/autoconfig/Makefile.old Sat Nov 30 11:43:28 1991 --- /usr/src/sys/autoconfig/Makefile Sun Dec 22 15:58:54 1991 *************** *** 6,18 **** OBJS= attach.o do_config.o main.o read_dtab.o read_nlist.o uprobe.o \ brauto.o cnauto.o dhauto.o dhuauto.o drauto.o dzauto.o \ hkauto.o htauto.o lpauto.o raauto.o rkauto.o rlauto.o siauto.o \ ! tmauto.o tsauto.o xpauto.o rxauto.o dnauto.o tmsauto.o SRCS= attach.c do_config.c main.c read_dtab.c read_nlist.c uprobe.c \ brauto.c cnauto.c dhauto.c dhuauto.c \ drauto.c dzauto.c hkauto.c htauto.c \ lpauto.c raauto.c rkauto.c rlauto.c \ siauto.c tmauto.c tsauto.c xpauto.c \ ! rxauto.c dnauto.c tmsauto.c CFLAGS= -O -I. -I../h -I../pdpuba -I../pdp LFLAG= -i --- 6,18 ---- OBJS= attach.o do_config.o main.o read_dtab.o read_nlist.o uprobe.o \ brauto.o cnauto.o dhauto.o dhuauto.o drauto.o dzauto.o \ hkauto.o htauto.o lpauto.o raauto.o rkauto.o rlauto.o siauto.o \ ! tmauto.o tsauto.o xpauto.o rxauto.o dnauto.o tmsauto.o dhvauto.o SRCS= attach.c do_config.c main.c read_dtab.c read_nlist.c uprobe.c \ brauto.c cnauto.c dhauto.c dhuauto.c \ drauto.c dzauto.c hkauto.c htauto.c \ lpauto.c raauto.c rkauto.c rlauto.c \ siauto.c tmauto.c tsauto.c xpauto.c \ ! rxauto.c dnauto.c tmsauto.c dhvauto.c CFLAGS= -O -I. -I../h -I../pdpuba -I../pdp LFLAG= -i *** /usr/src/sys/autoconfig/uprobe.c.old Tue Aug 14 13:56:39 1990 --- /usr/src/sys/autoconfig/uprobe.c Sun Dec 22 16:00:36 1991 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)uprobe.c 1.1 (2.10BSD Berkeley) 12/1/86 */ /* --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)uprobe.c 1.2 (2.11BSD Berkeley) 12/22/91 */ /* *************** *** 25,31 **** int xpprobe(), hkprobe(), rlprobe(), rkprobe(), htprobe(), siprobe(), tmprobe(), tsprobe(), cnprobe(), dzprobe(), dhprobe(), dmprobe(), drprobe(), lpprobe(), dhuprobe(), raprobe(), rxprobe(), brprobe(), ! dnprobe(), tmsprobe(); UPROBE uprobe[] = { "hk", hkprobe, /* hk -- rk611, rk06/07 */ --- 25,31 ---- int xpprobe(), hkprobe(), rlprobe(), rkprobe(), htprobe(), siprobe(), tmprobe(), tsprobe(), cnprobe(), dzprobe(), dhprobe(), dmprobe(), drprobe(), lpprobe(), dhuprobe(), raprobe(), rxprobe(), brprobe(), ! dnprobe(), tmsprobe(), dhvprobe(); UPROBE uprobe[] = { "hk", hkprobe, /* hk -- rk611, rk06/07 */ *************** *** 41,47 **** "dh", dhprobe, /* dh -- DH11 */ "dm", dmprobe, /* dm -- DM11 */ "dr", drprobe, /* dr -- DR11W */ ! "du", dhuprobe, /* du -- dhu, dhv */ "dz", dzprobe, /* dz -- dz11 */ "cn", cnprobe, /* cn -- kl11, dl11 */ "lp", lpprobe, /* lp -- line printer */ --- 41,48 ---- "dh", dhprobe, /* dh -- DH11 */ "dm", dmprobe, /* dm -- DM11 */ "dr", drprobe, /* dr -- DR11W */ ! "du", dhuprobe, /* du -- DHU11 */ ! "dhv", dhvprobe, /* dhv -- DHV11 */ "dz", dzprobe, /* dz -- dz11 */ "cn", cnprobe, /* cn -- kl11, dl11 */ "lp", lpprobe, /* lp -- line printer */ *** /usr/src/sys/conf/GENERIC.old Sun May 19 01:09:53 1991 --- /usr/src/sys/conf/GENERIC Sun Dec 22 16:09:46 1991 *************** *** 336,342 **** NKL 1 # KL11, DL11 NDH 0 # DH11; NDH is in units of boards (16 each) NDM 0 # DM11; NDM is in units of boards (16 each) ! NDHU 0 # DHU11, DHV11 NDZ 0 # DZ11; NDZ is in units of boards (8 each) ######################################### --- 336,343 ---- NKL 1 # KL11, DL11 NDH 0 # DH11; NDH is in units of boards (16 each) NDM 0 # DM11; NDM is in units of boards (16 each) ! NDHU 0 # DHU11 ! NDHV 0 # DHV11 NDZ 0 # DZ11; NDZ is in units of boards (8 each) ######################################### *** /usr/src/sys/conf/KAZOO.old Wed Dec 19 10:12:43 1990 --- /usr/src/sys/conf/KAZOO Sun Dec 22 16:11:27 1991 *************** *** 337,343 **** NKL 1 # KL11, DL11 NDH 0 # DH11; NDH is in units of boards (16 each) NDM 0 # DM11; NDM is in units of boards (16 each) ! NDHU 0 # DHU11, DHV11 NDZ 1 # DZ11; NDZ is in units of boards (8 each) ######################################### --- 337,344 ---- NKL 1 # KL11, DL11 NDH 0 # DH11; NDH is in units of boards (16 each) NDM 0 # DM11; NDM is in units of boards (16 each) ! NDHU 0 # DHU11 ! NDHV 0 # DHV11 NDZ 1 # DZ11; NDZ is in units of boards (8 each) ######################################### *** /usr/src/sys/conf/Make.nsunix.old Sun Nov 11 14:49:16 1990 --- /usr/src/sys/conf/Make.nsunix Sun Dec 22 16:15:43 1991 *************** *** 58,64 **** libc_remque.o libc_strlen.o libc_udiv.o net_copy.o net_csv.o \ net_mbuf.o net_scb.o net_SKcall.o net_trap.o net_xxx.o ! BASE= br.o cons.o dh.o dhu.o dr.o dz.o hk.o ht.o init_sysent.o \ kern_clock.o kern_descrip.o kern_mman.o kern_proc.o kern_prot.o \ kern_subr.o kern_synch.o kern_xxx.o lp.o machdep.o ra.o ram.o \ rk.o rl.o rx.o si.o subr_rmap.o sys_inode.o sys_kern.o \ --- 58,64 ---- libc_remque.o libc_strlen.o libc_udiv.o net_copy.o net_csv.o \ net_mbuf.o net_scb.o net_SKcall.o net_trap.o net_xxx.o ! BASE= br.o cons.o dh.o dhu.o dhv.o dr.o dz.o hk.o ht.o init_sysent.o \ kern_clock.o kern_descrip.o kern_mman.o kern_proc.o kern_prot.o \ kern_subr.o kern_synch.o kern_xxx.o lp.o machdep.o ra.o ram.o \ rk.o rl.o rx.o si.o subr_rmap.o sys_inode.o sys_kern.o \ *** /usr/src/sys/conf/Make.pdpuba.old Sun Jul 1 00:10:07 1990 --- /usr/src/sys/conf/Make.pdpuba Sun Dec 22 16:16:21 1991 *************** *** 14,23 **** U= ../pdpuba VPATH= ../pdpuba ! CFILES= ${U}/br.c ${U}/dh.c ${U}/dn.c ${U}/dhu.c ${U}/dkbad.c ${U}/dr.c \ ! ${U}/dz.c ${U}/hk.c ${U}/ht.c ${U}/lp.c ${U}/ra.c ${U}/rk.c \ ${U}/rl.c ${U}/rx.c ${U}/si.c ${U}/tm.c ${U}/tmscp.c ${U}/ts.c ${U}/xp.c ! OBJS= br.o dh.o dhu.o dkbad.o dn.o dr.o dz.o hk.o ht.o lp.o ra.o rk.o \ rl.o rx.o si.o tm.o tmscp.o ts.o xp.o dn.o .c.o: --- 14,23 ---- U= ../pdpuba VPATH= ../pdpuba ! CFILES= ${U}/br.c ${U}/dh.c ${U}/dn.c ${U}/dhu.c ${U}/dhv.c ${U}/dkbad.c \ ! ${U}/dr.c ${U}/dz.c ${U}/hk.c ${U}/ht.c ${U}/lp.c ${U}/ra.c ${U}/rk.c \ ${U}/rl.c ${U}/rx.c ${U}/si.c ${U}/tm.c ${U}/tmscp.c ${U}/ts.c ${U}/xp.c ! OBJS= br.o dh.o dhu.o dhv.o dkbad.o dn.o dr.o dz.o hk.o ht.o lp.o ra.o rk.o \ rl.o rx.o si.o tm.o tmscp.o ts.o xp.o dn.o .c.o: *** /usr/src/sys/conf/Make.sunix.old Sat Nov 30 08:12:25 1991 --- /usr/src/sys/conf/Make.sunix Sun Dec 22 16:16:31 1991 *************** *** 45,51 **** mch_dump.o mch_dzpdma.o mch_fpsim.o mch_profile.o mch_start.o \ mch_trap.o mch_vars.o mch_xxx.o conf.o ioconf.o boot.o ! BASE= br.o dh.o dhu.o dkbad.o dr.o dz.o init_sysent.o kern_clock.o \ kern_descrip.o kern_mman.o kern_proc.o kern_sig.o kern_subr.o \ kern_synch.o lp.o machdep.o ra.o ram.o rk.o rl.o rx.o si.o \ subr_rmap.o subr_xxx.o sys_inode.o sys_pipe.o trap.o tty.o \ --- 45,51 ---- mch_dump.o mch_dzpdma.o mch_fpsim.o mch_profile.o mch_start.o \ mch_trap.o mch_vars.o mch_xxx.o conf.o ioconf.o boot.o ! BASE= br.o dh.o dhu.o dhv.o dkbad.o dr.o dz.o init_sysent.o kern_clock.o \ kern_descrip.o kern_mman.o kern_proc.o kern_sig.o kern_subr.o \ kern_synch.o lp.o machdep.o ra.o ram.o rk.o rl.o rx.o si.o \ subr_rmap.o subr_xxx.o sys_inode.o sys_pipe.o trap.o tty.o \ *** /usr/src/sys/conf/Make.unix.old Sun Nov 11 14:49:43 1990 --- /usr/src/sys/conf/Make.unix Sun Dec 22 16:16:42 1991 *************** *** 48,54 **** # This overlay setup is far too configuration dependent, with both text # and data trying to share one address space. You're on you're own here ... # ! BASE= br.o clock.o cons.o dh.o dhu.o dkbad.o dn.o dr.o dz.o hk.o ht.o \ init_main.o init_sysent.o kern_acct.o kern_clock.o kern_descrip.o \ kern_exec.o kern_exit.o kern_fork.o kern_mman.o kern_pdp.o \ kern_proc.o kern_prot.o kern_resource.o kern_rtp.o kern_sig.o \ --- 48,54 ---- # This overlay setup is far too configuration dependent, with both text # and data trying to share one address space. You're on you're own here ... # ! BASE= br.o clock.o cons.o dh.o dhu.o dhv.o dkbad.o dn.o dr.o dz.o hk.o ht.o \ init_main.o init_sysent.o kern_acct.o kern_clock.o kern_descrip.o \ kern_exec.o kern_exit.o kern_fork.o kern_mman.o kern_pdp.o \ kern_proc.o kern_prot.o kern_resource.o kern_rtp.o kern_sig.o \ *** /usr/src/sys/conf/VAX.old Sat Aug 12 21:58:07 1989 --- /usr/src/sys/conf/VAX Sun Dec 22 16:12:46 1991 *************** *** 332,338 **** NKL 2 # KL11, DL11 NDH 2 # DH11; NDH is in units of boards (16 each) NDM 2 # DM11; NDM is in units of boards (16 each) ! NDHU 2 # DHU11, DHV11 NDZ 2 # DZ11; NDZ is in units of boards (8 each) ######################################### --- 332,339 ---- NKL 2 # KL11, DL11 NDH 2 # DH11; NDH is in units of boards (16 each) NDM 2 # DM11; NDM is in units of boards (16 each) ! NDHU 2 # DHU11 ! HDHV 2 # DHV11 NDZ 2 # DZ11; NDZ is in units of boards (8 each) ######################################### *** /usr/src/sys/conf/config.old Wed Jun 5 15:52:56 1991 --- /usr/src/sys/conf/config Sun Dec 22 16:14:29 1991 *************** *** 234,239 **** --- 234,240 ---- echo "#define NDM $NDM" >> ../$MACHINE/dh.h echo "#define NDN $NDN" > ../$MACHINE/dn.h echo "#define NDHU $NDHU" > ../$MACHINE/dhu.h + echo "#define NDHV $NDHV" > ../$MACHINE/dhv.h echo "#define NDMC $NDMC" > ../$MACHINE/dmc.h echo "#define NDR $NDR" > ../$MACHINE/dr.h echo "#define NDZ $NDZ" > ../$MACHINE/dz.h *** /usr/src/sys/pdp/conf.c.old Sun Sep 22 08:33:53 1991 --- /usr/src/sys/pdp/conf.c Sun Dec 22 17:55:07 1991 *************** *** 273,278 **** --- 273,294 ---- #define dhu_tty ((struct tty *) NULL) #endif + #include "dhv.h" + #if NDHV > 0 + int dhvopen(), dhvclose(), dhvread(), dhvwrite(), dhvioctl(), dhvstop(); + int dhvselect(); + extern struct tty dhv_tty[]; + #else + #define dhvopen nodev + #define dhvclose nodev + #define dhvread nodev + #define dhvwrite nodev + #define dhvioctl nodev + #define dhvstop nodev + #define dhvselect nodev + #define dhv_tty ((struct tty *) NULL) + #endif + #include "dn.h" #if NDN > 0 int dnopen(), dnclose(), dnwrite(); *************** *** 391,396 **** --- 407,416 ---- tmscpopen, tmscpclose, rawread, rawwrite, tmscpioctl, nulldev, 0, seltrue, tmscpstrategy, + /* dhv = 24 */ + dhvopen, dhvclose, dhvread, dhvwrite, + dhvioctl, dhvstop, dhv_tty, dhvselect, + nulldev, }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); *** /usr/src/sys/pdp/scb.s.old Tue Aug 14 14:06:37 1990 --- /usr/src/sys/pdp/scb.s Sun Dec 22 16:39:39 1991 *************** *** 16,21 **** --- 16,22 ---- #include "de.h" #include "dh.h" #include "dhu.h" + #include "dhv.h" #include "dn.h" #include "dr.h" #include "dz.h" *************** *** 378,386 **** HANDLER(dmintr) #endif ! #if NDHU > 0 /* DHU, DHV */ HANDLER(dhurint) HANDLER(dhuxint) #endif #if NDN > 0 /* DN11 */ --- 379,392 ---- HANDLER(dmintr) #endif ! #if NDHU > 0 /* DHU */ HANDLER(dhurint) HANDLER(dhuxint) + #endif + + #if NDHV > 0 /* DHV */ + HANDLER(dhvrint) + HANDLER(dhvxint) #endif #if NDN > 0 /* DN11 */ *** /usr/src/sys/pdpdist/dtab.old Mon Aug 27 15:44:40 1990 --- /usr/src/sys/pdpdist/dtab Sun Dec 22 16:20:35 1991 *************** *** 5,11 **** # dr ? 172410 124 5 drintr # dr11-w (b-bus emulator) # dr ? 172430 130 5 drintr # dr11-w (gc-bus emulator) # dr ? 172450 134 5 drintr # dr11-w (em-2 interface) ! # du ? 160020 310 5 dhurint dhuxint # dhv/dhu11 terminal mux # dm ? 170500 310 4 dmintr # dm11 dh modem control # dh ? 160020 320 5 dhrint dhxint # dh11 terminal mux # dz ? 160100 310 5 dzrint dzdma # dz11 terminal mux --- 5,12 ---- # dr ? 172410 124 5 drintr # dr11-w (b-bus emulator) # dr ? 172430 130 5 drintr # dr11-w (gc-bus emulator) # dr ? 172450 134 5 drintr # dr11-w (em-2 interface) ! # du ? 160020 310 5 dhurint dhuxint # dhu11 terminal mux ! # dhv ? 160020 310 5 dhvrint dhvxint # dhv terminal mux # dm ? 170500 310 4 dmintr # dm11 dh modem control # dh ? 160020 320 5 dhrint dhxint # dh11 terminal mux # dz ? 160100 310 5 dzrint dzdma # dz11 terminal mux *** /usr/src/sys/pdpuba/dhv.c.old Thu Sep 1 14:14:03 1988 --- /usr/src/sys/pdpuba/dhv.c Thu Dec 26 10:13:41 1991 *************** *** 3,12 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)dhv.c 1.1 (2.10BSD Berkeley) 12/1/86 */ /* * based on dh.c 6.3 84/03/15 * and on dmf.c 6.2 84/02/16 * --- 3,13 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)dhv.c 2.0 (2.11BSD Berkeley) 12/22/91 */ /* + * ported to 2.11BSD (uio logic added) 12/22/91 - SMS * based on dh.c 6.3 84/03/15 * and on dmf.c 6.2 84/02/16 * *************** *** 43,49 **** #define NDHVLINE (NDHV*8) #define UNIT(x) (minor(x) & 077) ! #define CDWAIT(x) (minor(x) & 0200) #define HWFLOW(x) (minor(x) & 0100) #define ISPEED B9600 --- 44,50 ---- #define NDHVLINE (NDHV*8) #define UNIT(x) (minor(x) & 077) ! #define CDWAIT(x) (!(minor(x) & 0200)) #define HWFLOW(x) (minor(x) & 0100) #define ISPEED B9600 *************** *** 91,99 **** /* * Routine called to attach a dhv. - * Called dvattach for autoconfig. */ ! dvattach(addr,unit) register caddr_t addr; register u_int unit; { --- 92,99 ---- /* * Routine called to attach a dhv. */ ! dhvattach(addr,unit) register caddr_t addr; register u_int unit; { *************** *** 230,249 **** return ( ttselect ( dev & ~0300, rw ) ); } ! dhvread(dev) dev_t dev; { register struct tty *tp = &dhv_tty[UNIT(dev)]; ! return ( (*linesw[tp->t_line].l_read) (tp) ); } ! dhvwrite(dev) dev_t dev; { register struct tty *tp = &dhv_tty[UNIT(dev)]; ! return ( (*linesw[tp->t_line].l_write) (tp) ); } /* --- 230,251 ---- return ( ttselect ( dev & ~0300, rw ) ); } ! dhvread(dev, uio) dev_t dev; + struct uio *uio; { register struct tty *tp = &dhv_tty[UNIT(dev)]; ! return((*linesw[tp->t_line].l_read) (tp, uio)); } ! dhvwrite(dev, uio) dev_t dev; + struct uio *uio; { register struct tty *tp = &dhv_tty[UNIT(dev)]; ! return((*linesw[tp->t_line].l_write) (tp, uio)); } /* *************** *** 403,408 **** --- 405,411 ---- */ /*ARGSUSED*/ dhvioctl(dev, cmd, data, flag) + register dev_t dev; u_int cmd; caddr_t data; {