From e710973823a9bbc5e904b1e829a0707e61ff21c5 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Tue, 3 Aug 2004 21:46:59 +0000 Subject: Replace the old 4.4BSD scsi code used on hp300 with a ``real'' driver interfaced with the MI scsi code. Adapted from NetBSD with some changes (especially to get tape and old cd-rom drives to not cause the driver to spin during probe). Tested by millert@ and I, ok millert@ --- etc/etc.hp300/MAKEDEV | 57 ++++++++++++++++++++++++++++++++++++++---------- etc/etc.hp300/MAKEDEV.md | 23 +++++++++++-------- 2 files changed, 59 insertions(+), 21 deletions(-) (limited to 'etc/etc.hp300') diff --git a/etc/etc.hp300/MAKEDEV b/etc/etc.hp300/MAKEDEV index a6c540c41ef..acb6c86ea07 100644 --- a/etc/etc.hp300/MAKEDEV +++ b/etc/etc.hp300/MAKEDEV @@ -31,14 +31,16 @@ # local Configuration specific devices # Disks: # ccd* Concatenated disk devices +# cd* ATAPI and SCSI CD-ROM drives # hd* HP300 HP-IB disks # rd* "rd" pseudo-disks # sd* SCSI disks, including flopticals # vnd* "file" pseudo-disk devices # Tapes: +# ch* SCSI media changers # ct* HP300 HP-IB cartridge tape drives # mt* (Magnetic) 9-track reel tape drives -# st* Exabyte tape +# st* SCSI tape drives # Terminal ports: # apci* HP400 4 port serial mux interface # dca* HP200/300 single port serial interface @@ -59,8 +61,10 @@ # lkm Loadable kernel modules interface # pf* Packet Filter # *random In-kernel random data source -# tun* Network tunnel driver +# ss* SCSI scanners # systrace* System call tracing device +# tun* Network tunnel driver +# uk* SCSI unknown devices # xfs* XFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -195,7 +199,7 @@ U=`unt $i` case $i in ramdisk) R std ct0 ct1 st0 st1 hd0 hd1 hd2 hd3 hd4 - R sd0 sd1 sd2 sd3 sd4 rd0 pty0 + R sd0 sd1 sd2 sd3 sd4 cd0 cd1 rd0 pty0 R hil grf0 apci0 ite0 dca0 dcm0 dcm1 R bpf0 bpf1 tun0 tun1 lkm random ;; @@ -311,14 +315,26 @@ xfs*) M xfs$U c 51 $U 600 ;; -systrace) - M systrace c 50 0 644 +uk*) + M uk$U c 37 $U 640 operator ;; tun*) M tun$U c 23 $U 600 ;; +systrace) + M systrace c 50 0 644 + ;; + +ss*) + M ss$U c 38 $(($U*16)) 640 operator + M nss$U c 38 $(($(($U*16))+1)) 640 operator + M enss$U c 38 $(($(($U*16))+3)) 640 operator + RMlist="$RMlist scan$U" + MKlist="$MKlist;umask 77;ln -s ss$U scan$U" + ;; + *random) n=0 for pre in " " s u p a @@ -372,11 +388,20 @@ ptm) M ptm c 52 0 666 ;; -ct*|mt*|st*) +st*) + n=$(($U*16)) + for pre in " " n e en + do + M ${pre}st$U b 7 $n 660 operator + M ${pre}rst$U c 20 $n 660 operator + n=$(($n+1)) + done + ;; + +ct*|mt*) case $i in ct*) name=ct blk=0 chr=7;; mt*) name=mt blk=1 chr=16;; - st*) name=st blk=7 chr=20;; esac case $U in [0-7]) @@ -396,6 +421,10 @@ ct*|mt*|st*) esac ;; +ch*) + M ch$U c 39 $U 660 operator + ;; + vnd*) dodisk vnd $U 6 19 $U 0 dodisk svnd $U 6 19 $U 2048 @@ -405,16 +434,20 @@ rd*) dodisk2 rd $U 8 34 $U 0 ;; +cd*) + dodisk2 cd $U 9 18 $U 0 + ;; + local) test -s $T.local && sh $T.local ;; all) - R ite0 ct0 ct1 hd0 hd1 hd2 dcm0 dcm1 dcm2 dcm3 dca0 dca1 st0 - R st1 hil grf0 ccd0 ccd1 ccd2 ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 - R sd2 sd3 sd4 rd0 tun0 tun1 tun2 tun3 bpf0 bpf1 bpf2 bpf3 bpf4 - R bpf5 bpf6 bpf7 bpf8 bpf9 pty0 xfs0 ptm local ppi0 apci0 - R random lkm pf systrace std fd + R ite0 ct0 ct1 hd0 hd1 hd2 dcm0 dcm1 dcm2 dcm3 dca0 dca1 hil + R grf0 ccd0 ccd1 ccd2 ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 + R sd4 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bpf0 bpf1 bpf2 bpf3 bpf4 + R bpf5 bpf6 bpf7 bpf8 bpf9 pty0 xfs0 ss0 ch0 ptm local ppi0 + R apci0 uk0 random lkm pf systrace std st0 st1 fd ;; sd*|hd*|ccd*) diff --git a/etc/etc.hp300/MAKEDEV.md b/etc/etc.hp300/MAKEDEV.md index 871f5a32c41..cab4c45e608 100644 --- a/etc/etc.hp300/MAKEDEV.md +++ b/etc/etc.hp300/MAKEDEV.md @@ -1,5 +1,5 @@ vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.21 2004/04/11 18:05:23 millert Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.22 2004/08/03 21:46:46 miod Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2004 Todd T. Fries @@ -20,11 +20,10 @@ dnl *** hp300 specific device scripts/descriptions dnl __devitem(ct, ct*, HP300 HP-IB cartridge tape drives,{-\&ct-})dnl __devitem(hd, {-hd*-}, HP300 HP-IB disks)dnl -_mkdev(st_hp300, ct*|mt*|st*, +_mkdev(ct, ct*|mt*, {-case $i in ct*) name=ct blk=major_ct_b chr=major_ct_c;; mt*) name=mt blk=major_mt_b chr=major_mt_c;; - st*) name=st blk=major_st_hp300_b chr=major_st_hp300_c;; esac case $U in [0-7]) @@ -42,7 +41,6 @@ _mkdev(st_hp300, ct*|mt*|st*, echo bad unit for tape in: $1 ;; esac-})dnl -__devitem(st_hp300, st*, Exabyte tape,st)dnl __devitem(grf, grf*, Raw interface to HP300 graphics devices)dnl dnl dnl @@ -53,14 +51,16 @@ _DEV(std) _DEV(local) _TITLE(dis) _DEV(ccd, 17, 5) +_DEV(cd, 18, 9) _DEV(hd, 9, 2) _DEV(rd, 34, 8) _DEV(sd, 8, 4) _DEV(vnd, 19, 6) _TITLE(tap) +_DEV(ch, 39) _DEV(ct, 7, 0) _DEV(mt, 16, 1) -_DEV(st_hp300, 20, 7) +_DEV(st, 20, 7) _TITLE(term) _DEV(apci) _DEV(dca, 12) @@ -82,15 +82,17 @@ _DEV(hil, 14) _DEV(lkm, 24) _DEV(pf, 33) _DEV(rnd, 32) -_DEV(tun, 23) +_DEV(ss, 38) _DEV(systrace, 50) +_DEV(tun, 23) +_DEV(uk, 37) _DEV(xfs, 51) dnl divert(__mddivert)dnl dnl ramdisk) _recurse std ct0 ct1 st0 st1 hd0 hd1 hd2 hd3 hd4 - _recurse sd0 sd1 sd2 sd3 sd4 rd0 pty0 + _recurse sd0 sd1 sd2 sd3 sd4 cd0 cd1 rd0 pty0 _recurse hil grf0 apci0 ite0 dca0 dcm0 dcm1 _recurse bpf0 bpf1 tun0 tun1 lkm random ;; @@ -192,7 +194,7 @@ hil) dnl target(all, ses, 0)dnl target(all, ch, 0)dnl -target(all, ss, 0, 1)dnl +target(all, ss, 0)dnl target(all, xfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl @@ -203,21 +205,24 @@ target(all, xy, 0, 1, 2, 3)dnl target(all, rd, 0)dnl target(all, cd, 0, 1)dnl target(all, sd, 0, 1, 2, 3, 4)dnl +target(all, st, 0, 1)dnl +target(all, uk, 0)dnl target(all, vnd, 0, 1, 2, 3)dnl target(all, ccd, 0, 1, 2, 3)dnl target( all, grf, 0)dnl dnl XXX target( all, hil, 0, 1, 2, 3, 4, 5, 6, 7)dnl target( all, hil, )dnl -twrget( all, st_hp300, st, 0, 1)dnl target( all, dca, 0, 1)dnl target( all, dcm, 0, 1, 2, 3)dnl target( all, hd, 0, 1, 2)dnl target( all, ct, 0, 1)dnl target( all, ite, 0)dnl target( all, ttye, 0, 1, 2, 3, 4, 5, 6)dnl +target(ramd, cd, 0, 1)dnl target(ramd, ct, 0, 1)dnl target(ramd, hd, 0, 1, 2)dnl target(ramd, sd, 0, 1, 2)dnl +target(ramd, st, 0, 1)dnl target(ramd, rd, 0, 1)dnl target(ramd, pty, 0)dnl target(ramd, hil, )dnl -- cgit v1.2.3