xref: /original-bsd/sys/hp300/dev/stvar.h (revision edc2ab72)
1 /*
2  * Copyright (c) 1990 University of Utah.
3  * Copyright (c) 1990, 1993
4  *	The Regents of the University of California.  All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * the Systems Programming Group of the University of Utah Computer
8  * Science Department.
9  *
10  * %sccs.include.redist.c%
11  *
12  *      @(#)stvar.h	8.1 (Berkeley) 06/10/93
13  */
14 
15 /*
16  * stvar.h scsi tape driver
17  */
18 
19 struct exb_xsense {
20 	u_char  reserved8;
21 	u_char  reserved9;
22 	u_char  reserved10;
23 	u_char  reserved11;
24 	u_char  addsens;
25 	u_char  addsensq;
26 	u_char  reserved14;
27 	u_char  reserved15;
28 	u_char  rwerrcnt2;
29 	u_char  rwerrcnt1;
30 	u_char  rwerrcnt0;
31 	u_char  pf: 1,
32 		bpe: 1,
33 		fpe: 1,
34 		me: 1,
35 		eco: 1,
36 		tme: 1,
37 		tnp: 1,
38 		bot: 1;
39 	u_char  xfr: 1,
40 		tmd: 1,
41  		wp: 1,
42 		fmke: 1,
43        		ure: 1,
44 		we1: 1,
45 		sse: 1,
46 		fe: 1;
47 	u_char  rsvd: 6,
48 		wseb: 1,
49 		wseo: 1;
50 	u_char  reserved22;
51 	u_char  tplft2;
52 	u_char  tplft1;
53 	u_char  tplft0;
54 };
55 
56 /* xsense sense key */
57 #define XSK_NOSENCE	0x0
58 #define XSK_NOTUSED1	0x1
59 #define XSK_NOTRDY	0x2
60 #define XSK_MEDERR	0x3
61 #define XSK_HRDWERR	0x4
62 #define XSK_ILLREQ	0x5
63 #define XSK_UNTATTEN	0x6
64 #define XSK_DATAPROT	0x7
65 #define XSK_BLNKCHK	0x8
66 #define XSK_VENDOR	0x9
67 #define XSK_CPYABORT	0xa
68 #define XSK_ABORTCMD	0xb
69 #define XSK_NOTUSEDC	0xc
70 #define XSK_VOLOVER	0xd
71 #define XSK_NOTUSEDE	0xe
72 #define XSK_REVERVED	0xf
73 
74 struct  exb_inquiry {
75 	char	venderunique[16];
76 };
77 
78 struct	st_mode {
79 	u_char	sdl;
80 	u_char  medtype;
81 	u_char  wp: 1,		/* write protect */
82 		bfmd: 3,	/* buffered write mode */
83 		speed: 4;
84 	u_char	bdl;
85 	u_char	dencod;
86 	u_char	numblk2;	/* number of blocks */
87 	u_char	numblk1;
88 	u_char	numblk0;
89 	u_char	rsvd1;
90 	u_char	blklen2;	/* block length */
91 	u_char	blklen1;
92 	u_char	blklen0;
93 };
94 
95 struct st_mode_exvup {
96 	/* vender unique */
97 	u_char	ct: 1,		/* international cartridge */
98 		rs1: 1,
99 		nd: 1,		/* no disconnect, date transfer */
100 		rs2: 1,
101 		nbe: 1,		/* no busy enable */
102 		ebd: 1,		/* even byte disconnect */
103 		pe: 1,		/* parity enable */
104 		nal: 1;		/* no auto load */
105 	u_char	rsvd: 7,
106 		p5: 1;
107 	u_char	motionthres;
108 	u_char	reconthres;
109 	u_char	gapthres;
110 };
111 
112 struct mode_select_data {
113 	u_char	rsvd1;
114 	u_char	rsvd2;
115 	u_char	rsvd3: 1,
116 		buff: 3,
117 		speed: 4;
118 	u_char  blkdeslen;
119 	u_char	density;
120 	u_char	blks2;
121 	u_char	blks1;
122 	u_char	blks0;
123 	u_char	rsvd4;
124 	u_char	blklen2;
125 	u_char	blklen1;
126 	u_char	blklen0;
127 	u_char	vupb;
128 	u_char	rsvd5: 7,
129 		p5: 1;
130 	u_char	motionthres;
131 	u_char	reconthres;
132  	u_char	gapthres;
133 };
134 
135 struct mode_sense {
136 	struct st_mode md;
137 	struct st_mode_exvup ex;
138 };
139 
140 #define EXDS_BITS \
141 "\20\20\
142 \7MOVED\6LEOT\5CMD\4WRTTN\3WMODE\2OPEN\1ALIV"
143 
144 #define EXER_BITS \
145 "\20\20VAL\17FMK\16EOM\15ILI\14KEY3\13KEY2\12KEY1\11KEY0\
146 \10RETRY7\7RETRY6\6RETRY5\5RETRY4\4RETRY3\3RETRY2\2RETRY1\1RETRY0"
147 
148