aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rio/link.h
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-03-24 06:18:24 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-24 10:33:28 -0500
commit74769abfcb430b839914f3fe91e23a4f628d9553 (patch)
treeaf7443e43f236d4d9e6c87ef777989989f1079ec /drivers/char/rio/link.h
parent10e705f83c3e796893a70fb872895ba604901166 (diff)
[PATCH] rio: more header cleanup
Strip some of the typedef mess out Remove a small subset of unused defines and the like. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/rio/link.h')
-rw-r--r--drivers/char/rio/link.h106
1 files changed, 24 insertions, 82 deletions
diff --git a/drivers/char/rio/link.h b/drivers/char/rio/link.h
index 48d68ca7f825..6a64b5a5b3d0 100644
--- a/drivers/char/rio/link.h
+++ b/drivers/char/rio/link.h
@@ -37,38 +37,9 @@
37#ifndef _link_h 37#ifndef _link_h
38#define _link_h 1 38#define _link_h 1
39 39
40#ifndef lint
41#ifdef SCCS_LABELS
42/* static char *_rio_link_h_sccs = "@(#)link.h 1.15"; */
43#endif
44#endif
45
46
47
48/************************************************* 40/*************************************************
49 * Define the Link Status stuff 41 * Define the Link Status stuff
50 ************************************************/ 42 ************************************************/
51#define LRT_ACTIVE ((ushort) 0x01)
52#define LRT_SPARE1 ((ushort) 0x02)
53#define INTRO_RCVD ((ushort) 0x04)
54#define FORCED_DISCONNECT ((ushort) 0x08)
55#define LRT_SPARE2 ((ushort) 0x80)
56
57#define TOP_OF_RTA_RAM ((ushort) 0x7000)
58#define HOST_SERIAL_POINTER (unsigned char **) (TOP_OF_RTA_RAM - 2 * sizeof (ushort))
59
60/* Flags for ltt_status */
61#define WAITING_ACK (ushort) 0x0001
62#define DATA_SENT (ushort) 0x0002
63#define WAITING_RUP (ushort) 0x0004
64#define WAITING_RETRY (ushort) 0x0008
65#define WAITING_TOPOLOGY (ushort) 0x0010
66#define SEND_SYNC (ushort) 0x0020
67#define FOAD_THIS_LINK (ushort) 0x0040
68#define REQUEST_SYNC (ushort) 0x0080
69#define REMOTE_DYING (ushort) 0x0100
70#define DIE_NOW (ushort) 0x0200
71
72/* Boot request stuff */ 43/* Boot request stuff */
73#define BOOT_REQUEST ((ushort) 0) /* Request for a boot */ 44#define BOOT_REQUEST ((ushort) 0) /* Request for a boot */
74#define BOOT_ABORT ((ushort) 1) /* Abort a boot */ 45#define BOOT_ABORT ((ushort) 1) /* Abort a boot */
@@ -76,56 +47,27 @@
76 and load address */ 47 and load address */
77#define BOOT_COMPLETED ((ushort) 3) /* Boot completed */ 48#define BOOT_COMPLETED ((ushort) 3) /* Boot completed */
78 49
79/* States that a link can be in */
80#define LINK_DISCONNECTED ((ushort) 0) /* Disconnected */
81#define LINK_BOOT1 ((ushort) 1) /* Trying to send 1st stage boot */
82#define LINK_BOOT2 ((ushort) 2) /* Trying to send 2nd stage boot */
83#define LINK_BOOT2WAIT ((ushort) 3) /* Waiting for selftest results */
84#define LINK_BOOT3 ((ushort) 4) /* Trying to send 3rd stage boots */
85#define LINK_SYNC ((ushort) 5) /* Syncing */
86
87#define LINK_INTRO ((ushort) 10) /* Introductory packet */
88#define LINK_SUPPLYID ((ushort) 11) /* Trying to supply an ID */
89#define LINK_TOPOLOGY ((ushort) 12) /* Send a topology update */
90#define LINK_REQUESTID ((ushort) 13) /* Waiting for an ID */
91#define LINK_CONNECTED ((ushort) 14) /* Connected */
92
93#define LINK_INTERCONNECT ((ushort) 20) /* Subnets interconnected */
94
95#define LINK_SPARE ((ushort) 40)
96
97/*
98** Set the default timeout for link communications.
99*/
100#define LINKTIMEOUT (400 * MILLISECOND)
101
102/*
103** LED stuff
104*/
105#define LED_SET_COLOUR(colour)
106#define LED_OR_COLOUR(colour)
107#define LED_TIMEOUT(time)
108 50
109struct LPB { 51struct LPB {
110 WORD link_number; /* Link Number */ 52 u16 link_number; /* Link Number */
111 Channel_ptr in_ch; /* Link In Channel */ 53 Channel_ptr in_ch; /* Link In Channel */
112 Channel_ptr out_ch; /* Link Out Channel */ 54 Channel_ptr out_ch; /* Link Out Channel */
113 BYTE attached_serial[4]; /* Attached serial number */ 55 u8 attached_serial[4]; /* Attached serial number */
114 BYTE attached_host_serial[4]; 56 u8 attached_host_serial[4];
115 /* Serial number of Host who 57 /* Serial number of Host who
116 booted the other end */ 58 booted the other end */
117 WORD descheduled; /* Currently Descheduled */ 59 u16 descheduled; /* Currently Descheduled */
118 WORD state; /* Current state */ 60 u16 state; /* Current state */
119 WORD send_poll; /* Send a Poll Packet */ 61 u16 send_poll; /* Send a Poll Packet */
120 Process_ptr ltt_p; /* Process Descriptor */ 62 Process_ptr ltt_p; /* Process Descriptor */
121 Process_ptr lrt_p; /* Process Descriptor */ 63 Process_ptr lrt_p; /* Process Descriptor */
122 WORD lrt_status; /* Current lrt status */ 64 u16 lrt_status; /* Current lrt status */
123 WORD ltt_status; /* Current ltt status */ 65 u16 ltt_status; /* Current ltt status */
124 WORD timeout; /* Timeout value */ 66 u16 timeout; /* Timeout value */
125 WORD topology; /* Topology bits */ 67 u16 topology; /* Topology bits */
126 WORD mon_ltt; 68 u16 mon_ltt;
127 WORD mon_lrt; 69 u16 mon_lrt;
128 WORD WaitNoBoot; /* Secs to hold off booting */ 70 u16 WaitNoBoot; /* Secs to hold off booting */
129 PKT_ptr add_packet_list; /* Add packets to here */ 71 PKT_ptr add_packet_list; /* Add packets to here */
130 PKT_ptr remove_packet_list; /* Send packets from here */ 72 PKT_ptr remove_packet_list; /* Send packets from here */
131 73
@@ -136,17 +78,17 @@ struct LPB {
136 struct RUP rup; 78 struct RUP rup;
137 struct RUP link_rup; /* RUP for the link (POLL, 79 struct RUP link_rup; /* RUP for the link (POLL,
138 topology etc.) */ 80 topology etc.) */
139 WORD attached_link; /* Number of attached link */ 81 u16 attached_link; /* Number of attached link */
140 WORD csum_errors; /* csum errors */ 82 u16 csum_errors; /* csum errors */
141 WORD num_disconnects; /* number of disconnects */ 83 u16 num_disconnects; /* number of disconnects */
142 WORD num_sync_rcvd; /* # sync's received */ 84 u16 num_sync_rcvd; /* # sync's received */
143 WORD num_sync_rqst; /* # sync requests */ 85 u16 num_sync_rqst; /* # sync requests */
144 WORD num_tx; /* Num pkts sent */ 86 u16 num_tx; /* Num pkts sent */
145 WORD num_rx; /* Num pkts received */ 87 u16 num_rx; /* Num pkts received */
146 WORD module_attached; /* Module tpyes of attached */ 88 u16 module_attached; /* Module tpyes of attached */
147 WORD led_timeout; /* LED timeout */ 89 u16 led_timeout; /* LED timeout */
148 WORD first_port; /* First port to service */ 90 u16 first_port; /* First port to service */
149 WORD last_port; /* Last port to service */ 91 u16 last_port; /* Last port to service */
150}; 92};
151 93
152#endif 94#endif