1: struct rpdevice
2: {
3: short rpds;
4: short rper;
5: union {
6: short w;
7: char c[2];
8: } rpcs;
9: short rpwc;
10: caddr_t rpba;
11: short rpca;
12: short rpda;
13: short rpm1;
14: short rpm2;
15: short rpm3;
16: short suca;
17: short silo;
18: };
19:
20: /* bits in rpds */
21: #define RPDS_SURDY 0100000 /* selected unit ready */
22: #define RPDS_SUOL 0040000 /* selected unit on line */
23: #define RPDS_RP03 0020000 /* selected unit RP03 */
24: #define RPDS_HNF 0010000 /* header not found */
25: #define RPDS_SUSI 0004000 /* selected unit seek incomplete */
26: #define RPDS_SUSU 0002000 /* selected unit seek underway */
27: #define RPDS_SUFU 0001000 /* selected unit file unsafe */
28: #define RPDS_SUWP 0000400 /* selected unit write protected */
29: /* bits 7-0 are attention bits */
30: #define RPDS_BITS \
31: "\10\20SURDY\17SUOL\16RP03\15HNF\14SUSI\13SUSU\12SUFU\11SUWP"
32:
33: /* bits in rper */
34: #define RPER_WPV 0100000 /* write protect violation */
35: #define RPER_FUV 0040000 /* file unsafe violation */
36: #define RPER_NXC 0020000 /* nonexistent cylinder */
37: #define RPER_NXT 0010000 /* nonexistent track */
38: #define RPER_NXS 0004000 /* nonexistent sector */
39: #define RPER_PROG 0002000 /* program error */
40: #define RPER_FMTE 0001000 /* format error */
41: #define RPER_MODE 0000400 /* mode error */
42: #define RPER_LPE 0000200 /* longitudinal parity error */
43: #define RPER_WPE 0000100 /* word parity error */
44: #define RPER_CSME 0000040 /* checksum error */
45: #define RPER_TIMEE 0000020 /* timing error */
46: #define RPER_WCE 0000010 /* write check error */
47: #define RPER_NXME 0000004 /* nonexistent memory */
48: #define RPER_EOP 0000002 /* end of pack */
49: #define RPER_DSKERR 0000001 /* disk error */
50: #define RPER_BITS \
51: "\10\20WPV\17FUV\16NXC\15NXT\14NXS\13PROG\12FMTE\11MODE\10LPE\
52: \7WPE\6CSME\5TIMEE\4WCE\3NXME\2EOP\1DSKERR"
53:
54: /* bits in rpcs */
55: #define RP_ERR 0100000 /* error */
56: #define RP_HE 0040000 /* hard error */
57: #define RP_ATE 0020000 /* attention interrupt enable */
58: #define RP_MODE 0010000 /* mode */
59: #define RP_HDR 0004000 /* header */
60: /* bits 10-8 are drive select */
61: #define RP_RDY 0000200 /* ready */
62: #define RP_IDE 0000100 /* interrupt on done (error) enable */
63: /* bits 5-4 are the UNIBUS extension bits */
64: /* bits 3-1 are the function */
65: #define RP_GO 0000001 /* go */
66: #define RP_BITS \
67: "\10\20ERR\17HE\16ATE\15MODE\14HDR\10RDY\7IDE\1GO"
68:
69: /* commands */
70: #define RP_IDLE 0000000 /* idle */
71: #define RP_WCOM 0000002 /* write */
72: #define RP_RCOM 0000004 /* read */
73: #define RP_WCHK 0000006 /* write check */
74: #define RP_SEEK 0000010 /* seek */
75: #define RP_WNS 0000012 /* write (no seek) */
76: #define RP_HSEEK 0000014 /* home seek */
77: #define RP_RNS 0000016 /* read (no seek) */
78:
79: /* bits in rpm1 */
80: /* bits 15-13 are unused */
81: #define RPM1_SORDY 0010000 /* silo out ready */
82: #define RPM1_SIRDY 0004000 /* silo in ready */
83: #define RPM1_CONTROL 0002000 /* control */
84: #define RPM1_SETHEAD 0001000 /* set head */
85: #define RPM1_SETCYL 0000400 /* set cylinder */
86: /* bits 7-0 are the bus out signals */
87: #define RPM1_BITS \
88: "\10\15SORDY\14SIRDY\13CONTROL\12SETHEAD\11SETCYL"
89:
90: /* bits in rpm3 */
91: #define RPM3_MRO 0100000 /* maintenance read only */
92: #define RPM3_MRDY 0040000 /* maintenance ready */
93: #define RPM3_MOL 0020000 /* maintenance on line */
94: #define RPM3_MIDX 0010000 /* maintenance index */
95: #define RPM3_MFU 0004000 /* maintenance file unsafe */
96: #define RPM3_MSI 0002000 /* maintenance seek incomplete */
97: #define RPM3_MECYL 0001000 /* maintenance end of cylinder */
98: #define RPM3_MSECT 0000400 /* maintenance sector */
99: /* bits 7-1 are unused */
100: #define RPM3_CLK 0000001 /* maintenance clock */
101: #define RPM3_BITS \
102: "\10\20MRO\17MRDY\16MOL\15MIDX\14MFU\13MSI\12MECYL\11MSECT\1CLK"
Defined struct's
Defined macros
RP_GO
defined in line
65; used 4 times
RP_HE
defined in line
56;
never used
Usage of this include