1: /*
2: * Copyright (c) 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: * @(#)rxreg.h 1.2 (2.11BSD GTE) 1995/11/21
7: */
8:
9: struct rxdevice {
10: short rxcs; /* command and status register */
11: short rxdb; /* multipurpose register: */
12: #define rxba rxdb /* bus address register */
13: #define rxqa rxdb /* Q22 high-bits */
14: #define rxta rxdb /* track address register */
15: #define rxsa rxdb /* sector address register */
16: #define rxwc rxdb /* word count register */
17: #define rxes rxdb /* error and status register */
18: };
19:
20: /* bits in rxcs */
21: #define RX_ERR 0100000 /* error */
22: #define RX_INIT 0040000 /* initialize */
23:
24: /* bits 13-12 are the extension bits */
25: #define RX_RX02 0004000 /* rx02 (read only) */
26:
27: #define RX_Q22 0002000 /* enable 22-bit mode (DSD MXV-22) */
28: #define RX_HD 0001000 /* DSD 480 head select */
29: #define RX_DD 0000400 /* double density */
30: #define RX_XREQ 0000200 /* transfer request */
31: #define RX_IE 0000100 /* interrupt enable */
32: #define RX_DONE 0000040 /* done */
33: #define RX_UNIT 0000020 /* unit select */
34:
35: /* bits 3-1 are the function code */
36: #define RX_GO 0000001 /* go */
37:
38: /* function codes */
39: #define RX_FILL 0000000 /* fill buffer */
40: #define RX_EMPTY 0000002 /* empty */
41: #define RX_WSECT 0000004 /* write sector */
42: #define RX_RSECT 0000006 /* read sector */
43: #define RX_SMD 0000010 /* set media density */
44: #define RX_RDSTAT 0000012 /* read status */
45: #define RX_WDDSECT 0000014 /* write deleted data sector */
46: #define RX_RDEC 0000016 /* read error code */
47:
48: /* ioctls */
49: #define RXIOC_FORMAT _IO(r, 1) /* format media */
50:
51: #define RX_BITS \
52: "\10\20ERR\17INIT\14RX02\13QBUS\12HD\11DD\10XREQ\7IE\6DONE\5UNIT1\1GO"
53:
54: /* bits in rxes */
55: /* bits 15-12 are unused in the standard rx11 */
56: #define RXES_IBMDD 0010000 /* DSD 480 IBM double density select */
57: #define RXES_NXM 0004000 /* nonexistent memory */
58: #define RXES_WCOVFL 0002000 /* word count overflow */
59:
60: /* bit 9 is unused in the standard rx11 */
61: #define RXES_HD 0001000 /* DSD 480 head select */
62: #define RXES_UNIT 0000400 /* unit select */
63: #define RXES_RDY 0000200 /* ready */
64: #define RXES_DDATA 0000100 /* deleted data */
65: #define RXES_DD 0000040 /* double density */
66: #define RXES_DENSERR 0000020 /* density error */
67: #define RXES_ACLO 0000010 /* ac low */
68: #define RXES_INITDONE 0000004 /* initialization done */
69:
70: /* bit 1 is unused in the standard rx11 */
71: #define RXES_S1RDY 0000002 /* DSD 480 side 1 ready */
72: #define RXES_CRC 0000001 /* crc error */
73: #define RXES_BITS \
74: "\10\15IBMDD\14NXM\13WCOVFL\12HD\11UNIT1\10RDY\7DDATA\
75: \6DDENS\5DENSERR\4ACLO\3INIT\2S1RDY\1CRC"
76:
77: /* bits in rxes1 */
78: /* bits 15-8 contain the word count */
79: /* bits 7-0 contain the error code */
80: #define RXES1_D0NOHOME 0000010 /* drive 0 failed to see home on init */
81: #define RXES1_D1NOHOME 0000020 /* drive 1 failed to see home on init */
82: #define RXES1_XTRK 0000040 /* track number > 076 */
83: #define RXES1_WRAP 0000050 /* found home before desired track */
84: #define RXES1_HNF 0000070 /* header not found after 2 revs */
85: #define RXES1_NSEP 0000110 /* up controller found not SEP clock */
86: #define RXES1_NOPREAMB 0000120 /* preamble not found */
87: #define RXES1_NOID 0000130 /* preamble found;ID burst timeout */
88: #define RXES1_HNEQTRK 0000150 /* track reached doesn't match header */
89: #define RXES1_XIDAM 0000160 /* up made to many attempts for IDAM */
90: #define RXES1_NOAM 0000170 /* data AM timeout */
91: #define RXES1_CRC 0000200 /* crc error reading disk sector */
92: #define RXES1_OOPS 0000220 /* read/write electronics failed test */
93: #define RXES1_WCOVFL 0000230 /* word count overflow */
94: #define RXES1_DENSERR 0000240 /* density error */
95: #define RXES1_BADKEY 0000250 /* bad key word for Set Media Density */
96:
97: /* bits in rxes4 */
98: /* bits 15-8 contain the track address for header track address errors */
99: #define RXES4_UNIT 0000200 /* unit select */
100: #define RXES4_D1DENS 0000100 /* drive 1 density */
101: #define RXES4_HEAD 0000040 /* head loaded */
102: #define RXES4_D0DENS 0000020 /* drive 0 density */
103:
104: /* bits 3-1 are unused */
105: #define RXES4_DD 0000001 /* diskette is double density */
106: #define RXES4_BITS "\10\10DRIVE1\7D1HIDENS\6HEAD\5D0HIDENS\1DDENS"
107:
108: #define b_seccnt av_back
109: #define b_state b_active
Defined struct's
Defined macros
RX_DD
defined in line
29;
never used
RX_GO
defined in line
36; used 3 times
RX_HD
defined in line
28;
never used
RX_IE
defined in line
31; used 4 times
rxba
defined in line
12; used 6 times
rxes
defined in line
17; used 2 times
rxqa
defined in line
13;
never used
rxsa
defined in line
15; used 4 times
rxta
defined in line
14; used 4 times
rxwc
defined in line
16; used 3 times
Usage of this include