1: struct rkdevice
2: {
3: short rkds;
4: short rker;
5: short rkcs;
6: short rkwc;
7: caddr_t rkba;
8: short rkda;
9: };
10:
11: /* bits in rkds; all are read only */
12: /* bits 15-13 are drive identification */
13: #define RK_DPL 0010000 /* drive power low */
14: #define RK_RK05 0004000 /* drive is an rk05; always 1 */
15: #define RK_DRU 0002000 /* drive unsafe */
16: #define RK_SIN 0001000 /* seek incomplete */
17: #define RK_SOK 0000400 /* sector counter ok */
18: #define RK_DRY 0000200 /* drive ready */
19: #define RK_RWSRDY 0000100 /* read/write/seek ready */
20: #define RK_WPS 0000040 /* write protect status */
21: #define RK_SKC 0000020 /* seek complete */
22: /* bits 3-0 are sector counter */
23: #define RK_BITS \
24: "\10\15DPL\13DRU\12SIN\11SOK\10DRY\7RWSRDY\6WPS\5SKC"
25:
26: /* bits in rker; all are read only */
27: #define RKER_DRE 0100000 /* drive error */
28: #define RKER_OVR 0040000 /* overrun */
29: #define RKER_WLO 0020000 /* write lock out violation */
30: #define RKER_SKE 0010000 /* seek error */
31: #define RKER_PGE 0004000 /* programming error */
32: #define RKER_NXM 0002000 /* nonexistent memory */
33: #define RKER_DLT 0001000 /* data late */
34: #define RKER_TE 0000400 /* timing error */
35: #define RKER_NXD 0000200 /* nonexistent disk */
36: #define RKER_NXC 0000100 /* nonexistent cylinder */
37: #define RKER_NXS 0000040 /* nonexistent sector */
38: /* bits 4-2 are unused */
39: #define RKER_CSE 0000002 /* checksum error */
40: #define RKER_WCE 0000001 /* write check error */
41: #define RKER_BITS \
42: "\10\20DRE\17OVR\16WLO\15SKE\14PGE\13NXM\12DLT\11TE\10NXD\
43: \7NXC\6NXS\2CSE\1WCE"
44:
45: /* bits in rkcs */
46: #define RKCS_ERR 0100000 /* error */
47: #define RKCS_HE 0040000 /* hard error */
48: #define RKCS_SCP 0020000 /* search complete */
49: /* bit 12 is unused */
50: #define RKCS_INHBA 0004000 /* inhibit bus address increment */
51: #define RKCS_FMT 0002000 /* format */
52: /* bit 9 is unused */
53: #define RKCS_SSE 0000400 /* stop on soft error */
54: #define RKCS_RDY 0000200 /* control ready */
55: #define RKCS_IDE 0000100 /* interrupt on done enable */
56: /* bits 5-4 are the UNIBUS extension bits */
57: /* bits 3-1 is the command */
58: #define RKCS_GO 0000001 /* go */
59: #define RKCS_BITS \
60: "\10\20ERR\17HE\16SCP\15INHBA\14FMT\13SSE\12RDY\11IDE\1GO"
61:
62: /* commands */
63: #define RKCS_RESET 0000000 /* control reset */
64: #define RKCS_WCOM 0000002 /* write */
65: #define RKCS_RCOM 0000004 /* read */
66: #define RKCS_WCHK 0000006 /* write check */
67: #define RKCS_SEEK 0000010 /* seek */
68: #define RKCS_RCHK 0000012 /* read check */
69: #define RKCS_DRESET 0000014 /* drive reset */
70: #define RKCS_WLCK 0000016 /* write lock */
71:
72: /* bits in rkda */
73: /* bits 15-13 are drive select */
74: /* bits 12-5 are cylinder address */
75: #define RKDA_SUR 0000020 /* surface */
76: /* bits 3-0 are sector address */
Defined struct's
Defined macros
Usage of this include