Commit | Line | Data |
---|---|---|
c0e2fce3 BJ |
1 | /* mtreg.h 4.1 81/11/04 */ |
2 | ||
3 | /* | |
4 | * TU78 registers. | |
5 | */ | |
6 | ||
7 | struct mtdevice { | |
8 | int mtcs; /* control status register */ | |
9 | int mter; /* error register */ | |
10 | int mtca; /* command address, rec cnt, skp cnt reg */ | |
11 | int mtmr1; /* maintenance register */ | |
12 | int mtas; /* attention summary register */ | |
13 | int mtbc; /* byte count register */ | |
14 | int mtdt; /* drive type register */ | |
15 | int mtds; /* drive status register */ | |
16 | int mtsn; /* serial number register */ | |
17 | int mtmr2; /* maintenance register */ | |
18 | int mtmr3; /* maintenance register */ | |
19 | int mtner; /* non-data transfer error register */ | |
20 | int mtncs[4]; /* non-data transfer command registers */ | |
21 | int mtia; /* internal address */ | |
22 | int mtid; /* internal data */ | |
23 | }; | |
24 | ||
25 | /* mtcs */ | |
26 | #define MT_GO 000001 /* go bit */ | |
27 | #define MT_NOOP 000002 /* no operation */ | |
28 | #define MT_UNLOAD 000004 /* unload tape */ | |
29 | #define MT_REW 000006 /* rewind */ | |
30 | #define MT_SENSE 000010 /* sense */ | |
31 | #define MT_DSE 000012 /* data security erase */ | |
32 | #define MT_WTMPE 000014 /* write phase encoded tape mark */ | |
33 | #define MT_WTM MT_WTMPE /* generic write tape mark */ | |
34 | #define MT_WTMGCR 000016 /* write GCR tape mark */ | |
35 | #define MT_SFORW 000020 /* space forward record */ | |
36 | #define MT_SREV 000022 /* space reverse record */ | |
37 | #define MT_SFORWF 000024 /* space forward file */ | |
38 | #define MT_SREVF 000026 /* space reverse file */ | |
39 | #define MT_SFORWE 000030 /* space forward either */ | |
40 | #define MT_SREVE 000032 /* space reverse either */ | |
41 | #define MT_ERGPE 000034 /* erase tape, set PE */ | |
42 | #define MT_ERASE MT_ERGPE /* generic erase tape */ | |
43 | #define MT_ERGGCR 000036 /* erase tape, set GCR */ | |
44 | #define MT_CLSPE 000040 /* close file PE */ | |
45 | #define MT_CLS MT_CLSPE /* generic close file */ | |
46 | #define MT_CLSGCR 000042 /* close file GCR */ | |
47 | #define MT_SLEOT 000044 /* space to logical EOT */ | |
48 | #define MT_SFLEOT 000046 /* space forward file, stop on LEOT */ | |
49 | #define MT_WCHFWD 000050 /* write check forward */ | |
50 | #define MT_WCHREV 000056 /* write check reverse */ | |
51 | #define MT_WRITEPE 000060 /* write phase encoded */ | |
52 | #define MT_WRITE MT_WRITEPE /* generic write */ | |
53 | #define MT_WRITEGCR 000062 /* write group coded */ | |
54 | #define MT_READ 000070 /* read forward */ | |
55 | #define MT_EXSNS 000072 /* read extended sense error log */ | |
56 | #define MT_READREV 000076 /* read reverse */ | |
57 | #define MT_GCR 000002 /* make generic ops GCR ops */ | |
58 | ||
59 | /* mtds */ | |
60 | #define MTDS_RDY 0100000 /* tape ready */ | |
61 | #define MTDS_PRES 0040000 /* tape unit has power */ | |
62 | #define MTDS_ONL 0020000 /* online */ | |
63 | #define MTDS_REW 0010000 /* tape rewinding */ | |
64 | #define MTDS_PE 0004000 /* tape set for phase encoded */ | |
65 | #define MTDS_BOT 0002000 /* tape at BOT */ | |
66 | #define MTDS_EOT 0001000 /* tape at EOT */ | |
67 | #define MTDS_FPT 0000400 /* write protected */ | |
68 | #define MTDS_AVAIL 0000200 /* unit available */ | |
69 | #define MTDS_SHR 0000100 /* unit is shared */ | |
70 | #define MTDS_MAINT 0000040 /* maintenance mode */ | |
71 | #define MTDS_DSE 0000020 /* DSE in progress */ | |
72 | ||
73 | #define MTDS_BITS \ | |
74 | "\10\20RDY\17PRES\16ONL\15REW\14PE\13BOT\12EOT\11FPT\10AVAIL\ | |
75 | \7SHR\6MAINT\5DSE" | |
76 | ||
77 | /* mter */ | |
78 | #define MTER_INTCODE 0377 /* mask for interrupt code */ | |
79 | ||
80 | /* interrupt codes */ | |
81 | #define MTER_DONE 001 /* operation complete */ | |
82 | #define MTER_TM 002 /* unexpected tape mark */ | |
83 | #define MTER_BOT 003 /* unexpected BOT detected */ | |
84 | #define MTER_EOT 004 /* tape positioned beyond EOT */ | |
85 | #define MTER_LEOT 005 /* unexpected LEOT detected */ | |
86 | #define MTER_NOOP 006 /* no-op completed */ | |
87 | #define MTER_RWDING 007 /* rewinding */ | |
88 | #define MTER_FPT 010 /* write protect error */ | |
89 | #define MTER_NOTRDY 011 /* not ready */ | |
90 | #define MTER_NOTAVL 012 /* not available */ | |
91 | #define MTER_OFFLINE 013 /* offline */ | |
92 | #define MTER_NONEX 014 /* unit does not exist */ | |
93 | #define MTER_NOTCAP 015 /* not capable */ | |
94 | #define MTER_ONLINE 017 /* tape came online */ | |
95 | #define MTER_LONGREC 020 /* long tape record */ | |
96 | #define MTER_SHRTREC 021 /* short tape record */ | |
97 | #define MTER_RETRY 022 /* retry */ | |
98 | #define MTER_RDOPP 023 /* read opposite */ | |
99 | #define MTER_UNREAD 024 /* unreadable */ | |
100 | #define MTER_ERROR 025 /* error */ | |
101 | #define MTER_EOTERR 026 /* EOT error */ | |
102 | #define MTER_BADTAPE 027 /* tape position lost */ | |
103 | #define MTER_TMFLTA 030 /* TM fault A */ | |
104 | #define MTER_TUFLTA 031 /* TU fault A */ | |
105 | #define MTER_TMFLTB 032 /* TM fault B */ | |
106 | #define MTER_MBFLT 034 /* Massbus fault */ | |
107 | #define MTER_KEYFAIL 077 /* keypad entry error */ | |
108 | ||
109 | /* mtdt */ | |
110 | #define MTDT_NSA 0100000 /* not sector addressed; always 1 */ | |
111 | #define MTDT_TAP 0040000 /* tape; always 1 */ | |
112 | #define MTDT_MOH 0020000 /* moving head; always 0 */ | |
113 | #define MTDT_7CH 0010000 /* 7 channel; always 0 */ | |
114 | #define MTDT_DRQ 0004000 /* drive request required */ | |
115 | #define MTDT_SPR 0002000 /* slave present; always 1 ??? */ | |
116 | /* bit 9 is spare */ | |
117 | /* bits 8-0 are formatter/transport type */ | |
118 | ||
119 | /* mtid */ | |
120 | #define MTID_RDY 0100000 /* controller ready */ | |
121 | #define MTID_CLR 0040000 /* controller clear */ | |
122 | ||
123 | #define b_repcnt b_bcount | |
124 | #define b_command b_resid |