|
|
1.1 root 1: /*
2: * TM11 controller registers
3: */
4: struct device {
5: u_short tmer; /* error register, per drive */
6: u_short tmcs; /* control-status register */
7: short tmbc; /* byte/frame count */
8: u_short tmba; /* address */
9: short tmdb; /* data buffer */
10: short tmrd; /* read lines */
11: short tmmr; /* maintenance register */
12: };
13:
14: #define b_repcnt b_bcount
15: #define b_command b_resid
16:
17: /* bits in tmcs */
18: #define TM_GO 0000001
19: #define TM_OFFL 0000000 /* offline */
20: #define TM_RCOM 0000002 /* read */
21: #define TM_WCOM 0000004 /* write */
22: #define TM_WEOF 0000006 /* write-eof */
23: #define TM_SFORW 0000010 /* space forward */
24: #define TM_SREV 0000012 /* space backwards */
25: #define TM_WIRG 0000014 /* write with xtra interrecord gap */
26: #define TM_REW 0000016 /* rewind */
27: #define TM_SENSE TM_IE /* sense (internal to driver) */
28:
29: #define tmreverseop(cmd) ((cmd)==TM_SREV || (cmd)==TM_REW)
30:
31: /* TM_SNS is a pseudo-op used to get tape status */
32: #define TM_IE 0000100 /* interrupt enable */
33: #define TM_CUR 0000200 /* control unit is ready */
34: #define TM_DCLR 0010000 /* drive clear */
35: #define TM_D800 0060000 /* select 800 bpi density */
36: #define TM_ERR 0100000 /* drive error summary */
37:
38: /* bits in tmer */
39: #define TMER_ILC 0100000 /* illegal command */
40: #define TMER_EOF 0040000 /* end of file */
41: #define TMER_CRE 0020000 /* cyclic redundancy error */
42: #define TMER_PAE 0010000 /* parity error */
43: #define TMER_BGL 0004000 /* bus grant late */
44: #define TMER_EOT 0002000 /* at end of tape */
45: #define TMER_RLE 0001000 /* record length error */
46: #define TMER_BTE 0000400 /* bad tape error */
47: #define TMER_NXM 0000200 /* non-existant memory */
48: #define TMER_SELR 0000100 /* tape unit properly selected */
49: #define TMER_BOT 0000040 /* at beginning of tape */
50: #define TMER_CH7 0000020 /* 7 channel tape */
51: #define TMER_SDWN 0000010 /* gap settling down */
52: #define TMER_WRL 0000004 /* tape unit write protected */
53: #define TMER_RWS 0000002 /* tape unit rewinding */
54: #define TMER_TUR 0000001 /* tape unit ready */
55:
56: #define TMER_BITS \
57: "\10\20ILC\17EOF\16CRE\15PAE\14BGL\13EOT\12RLE\11BTE\10NXM\
58: \7SELR\6BOT\5CH7\4SDWN\3WRL\2RWS\1TUR"
59:
60: #define TMER_HARD (TMER_ILC|TMER_EOT)
61: #define TMER_SOFT (TMER_CRE|TMER_PAE|TMER_BGL|TMER_RLE|TMER_BTE|TMER_NXM)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.