1: /*
2: * Copyright (c) 1982, 1986 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)htreg.h 7.1 (Berkeley) 6/5/86
7: */
8:
9: struct htdevice
10: {
11: int htcs1; /* control status register */
12: int htds; /* drive status register */
13: int hter; /* error register */
14: int htmr; /* maintenance register */
15: int htas; /* attention status register */
16: int htfc; /* frame counter */
17: int htdt; /* drive type register */
18: int htck; /* nrzi check (crc) error character */
19: int htsn; /* serial number register */
20: int httc; /* tape controll register */
21: };
22:
23: /* htcs1 */
24: #define HT_GO 000001 /* go bit */
25: #define HT_SENSE 000000 /* no operations (sense) */
26: #define HT_REWOFFL 000002 /* rewind offline */
27: #define HT_REW 000006 /* rewind */
28: #define HT_DCLR 000010 /* drive clear */
29: #define HT_RIP 000020 /* read in preset */
30: #define HT_ERASE 000024 /* erase */
31: #define HT_WEOF 000026 /* write tape mark */
32: #define HT_SFORW 000030 /* space forward */
33: #define HT_SREV 000032 /* space reverse */
34: #define HT_WCHFWD 000050 /* write check forward */
35: #define HT_WCHREV 000056 /* write check reverse */
36: #define HT_WCOM 000060 /* write forward */
37: #define HT_RCOM 000070 /* read forward */
38: #define HT_RREV 000076 /* read reverse */
39:
40: /* htds */
41: #define HTDS_ATA 0100000 /* attention active */
42: #define HTDS_ERR 0040000 /* composite error */
43: #define HTDS_PIP 0020000 /* positioning in progress */
44: #define HTDS_MOL 0010000 /* medium on line */
45: #define HTDS_WRL 0004000 /* write lock */
46: #define HTDS_EOT 0002000 /* end of tape */
47: /* bit 9 is unused */
48: #define HTDS_DPR 0000400 /* drive present (always 1) */
49: #define HTDS_DRY 0000200 /* drive ready */
50: #define HTDS_SSC 0000100 /* slave status change */
51: #define HTDS_PES 0000040 /* phase-encoded status */
52: #define HTDS_SDWN 0000020 /* settle down */
53: #define HTDS_IDB 0000010 /* identification burst */
54: #define HTDS_TM 0000004 /* tape mark */
55: #define HTDS_BOT 0000002 /* beginning of tape */
56: #define HTDS_SLA 0000001 /* slave attention */
57:
58: #define HTDS_BITS \
59: "\10\20ATA\17ERR\16PIP\15MOL\14WRL\13EOT\11DPR\10DRY\
60: \7SSC\6PES\5SDWN\4IDB\3TM\2BOT\1SLA"
61:
62: /* hter */
63: #define HTER_CORCRC 0100000 /* correctible data or ecc */
64: #define HTER_UNS 0040000 /* unsafe */
65: #define HTER_OPI 0020000 /* operation incomplete */
66: #define HTER_DTE 0010000 /* drive timing error */
67: #define HTER_NEF 0004000 /* non-executable function */
68: #define HTER_CSITM 0002000 /* correctable skew/illegal tape mark */
69: #define HTER_FCE 0001000 /* frame count error */
70: #define HTER_NSG 0000400 /* non-standard gap */
71: #define HTER_PEFLRC 0000200 /* format error or lrc error */
72: #define HTER_INCVPE 0000100 /* incorrectable data error or vertical
73: parity error */
74: #define HTER_DPAR 0000040 /* data parity error */
75: #define HTER_FMT 0000020 /* format error */
76: #define HTER_CPAR 0000010 /* control bus parity error */
77: #define HTER_RMR 0000004 /* register modification refused */
78: #define HTER_ILR 0000002 /* illegal register */
79: #define HTER_ILF 0000001 /* illegal function */
80:
81: #define HTER_BITS \
82: "\10\20CORCRC\17UNS\16OPI\15DTE\14NEF\13CSITM\12FCE\11NSG\10PEFLRC\
83: \7INCVPE\6DPAR\5FMT\4CPAR\3RMR\2ILR\1ILF"
84: #define HTER_HARD \
85: (HTER_UNS|HTER_OPI|HTER_NEF|HTER_DPAR|HTER_FMT|HTER_CPAR| \
86: HTER_RMR|HTER_ILR|HTER_ILF)
87:
88: /* htdt */
89: #define HTDT_NSA 0100000 /* not sector addressed; always 1 */
90: #define HTDT_TAP 0040000 /* tape; always 1 */
91: #define HTDT_MOH 0020000 /* moving head; always 0 */
92: #define HTDT_7CH 0010000 /* 7 channel; always 0 */
93: #define HTDT_DRQ 0004000 /* drive requested; always 0 */
94: #define HTDT_SPR 0002000 /* slave present */
95: /* bit 9 is spare */
96: /* bits 8-0 are formatter/transport type */
97:
98: /* httc */
99: #define HTTC_ACCL 0100000 /* transport is not reading/writing */
100: #define HTTC_FCS 0040000 /* frame count status */
101: #define HTTC_SAC 0020000 /* slave address change */
102: #define HTTC_EAODTE 0010000 /* enable abort on data xfer errors */
103: /* bits 8-10 are density select */
104: #define HTTC_800BPI 0001400 /* in bits 8-10, dens=1600 */
105: #define HTTC_1600BPI 0002000 /* in bits 8-10, dens=800 */
106: /* bits 4-7 are format select */
107: #define HTTC_PDP11 0000300 /* in bits 4-7, pdp11 normal format */
108: #define HTTC_EVEN 0000010 /* select even parity */
109: /* bits 0 - 2 are slave select */
110:
111: #define b_repcnt b_bcount
112: #define b_command b_resid
Defined struct's
htdevice
defined in line
9; used 36 times
- in /usr/src/sys/stand/ht.c line
33-34(4),
69-70(4),
117(2)
- in /usr/src/sys/vaxmba/ht.c line
101(4),
225-226(4),
307(4),
362(4),
546(2),
558(2),
578(2),
596(2),
606(2)
Defined macros
HT_GO
defined in line
24; used 17 times
- in /usr/src/sys/stand/ht.c line
43,
76-81(2),
87-96(3)
- in /usr/src/sys/vaxmba/ht.c line
235,
271,
280,
295-298(2),
321,
371,
560,
572,
592,
610
Usage of this include