1 |
1275 |
phoenix |
/************************************************************************/
|
2 |
|
|
/* */
|
3 |
|
|
/* Title : RIO Shared Memory Window Inteface */
|
4 |
|
|
/* */
|
5 |
|
|
/* Author : N.P.Vassallo */
|
6 |
|
|
/* */
|
7 |
|
|
/* Creation : 7th June 1999 */
|
8 |
|
|
/* */
|
9 |
|
|
/* Version : 1.0.0 */
|
10 |
|
|
/* */
|
11 |
|
|
/* Copyright : (c) Specialix International Ltd. 1999 *
|
12 |
|
|
* This program is free software; you can redistribute it and/or modify
|
13 |
|
|
* it under the terms of the GNU General Public License as published by
|
14 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
15 |
|
|
* (at your option) any later version.
|
16 |
|
|
*
|
17 |
|
|
* This program is distributed in the hope that it will be useful,
|
18 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
|
|
* GNU General Public License for more details.
|
21 |
|
|
*
|
22 |
|
|
* You should have received a copy of the GNU General Public License
|
23 |
|
|
* along with this program; if not, write to the Free Software
|
24 |
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
25 |
|
|
* */
|
26 |
|
|
/* Description : Prototypes, structures and definitions */
|
27 |
|
|
/* describing RIO host card shared memory */
|
28 |
|
|
/* window interface structures: */
|
29 |
|
|
/* PARMMAP */
|
30 |
|
|
/* RUP */
|
31 |
|
|
/* PHB */
|
32 |
|
|
/* LPB */
|
33 |
|
|
/* PKT */
|
34 |
|
|
/* */
|
35 |
|
|
/************************************************************************/
|
36 |
|
|
|
37 |
|
|
/* History...
|
38 |
|
|
|
39 |
|
|
1.0.0 07/06/99 NPV Creation. (based on PARMMAP.H)
|
40 |
|
|
|
41 |
|
|
*/
|
42 |
|
|
|
43 |
|
|
#ifndef _riowinif_h /* If RIOWINDIF.H not already defined */
|
44 |
|
|
#define _riowinif_h 1
|
45 |
|
|
|
46 |
|
|
/*****************************************************************************
|
47 |
|
|
******************************** *********************************
|
48 |
|
|
******************************** General *********************************
|
49 |
|
|
******************************** *********************************
|
50 |
|
|
*****************************************************************************/
|
51 |
|
|
|
52 |
|
|
#define TPNULL ((_u16)(0x8000))
|
53 |
|
|
|
54 |
|
|
/*****************************************************************************
|
55 |
|
|
******************************** ********************************
|
56 |
|
|
******************************** PARM_MAP ********************************
|
57 |
|
|
******************************** ********************************
|
58 |
|
|
*****************************************************************************/
|
59 |
|
|
|
60 |
|
|
/* The PARM_MAP structure defines global values relating to the Host Card / RTA
|
61 |
|
|
and is the main structure from which all other structures are referenced. */
|
62 |
|
|
|
63 |
|
|
typedef struct _PARM_MAP
|
64 |
|
|
{
|
65 |
|
|
_u16 phb_ptr; /* 0x00 Pointer to the PHB array */
|
66 |
|
|
_u16 phb_num_ptr; /* 0x02 Ptr to Number of PHB's */
|
67 |
|
|
_u16 free_list; /* 0x04 Free List pointer */
|
68 |
|
|
_u16 free_list_end; /* 0x06 Free List End pointer */
|
69 |
|
|
_u16 q_free_list_ptr; /* 0x08 Ptr to Q_BUF variable */
|
70 |
|
|
_u16 unit_id_ptr; /* 0x0A Unit Id */
|
71 |
|
|
_u16 link_str_ptr; /* 0x0C Link Structure Array */
|
72 |
|
|
_u16 bootloader_1; /* 0x0E 1st Stage Boot Loader */
|
73 |
|
|
_u16 bootloader_2; /* 0x10 2nd Stage Boot Loader */
|
74 |
|
|
_u16 port_route_map_ptr; /* 0x12 Port Route Map */
|
75 |
|
|
_u16 route_ptr; /* 0x14 Route Map */
|
76 |
|
|
_u16 map_present; /* 0x16 Route Map present */
|
77 |
|
|
_u16 pkt_num; /* 0x18 Total number of packets */
|
78 |
|
|
_u16 q_num; /* 0x1A Total number of Q packets */
|
79 |
|
|
_u16 buffers_per_port; /* 0x1C Number of buffers per port */
|
80 |
|
|
_u16 heap_size; /* 0x1E Initial size of heap */
|
81 |
|
|
_u16 heap_left; /* 0x20 Current Heap left */
|
82 |
|
|
_u16 error; /* 0x22 Error code */
|
83 |
|
|
_u16 tx_max; /* 0x24 Max number of tx pkts per phb */
|
84 |
|
|
_u16 rx_max; /* 0x26 Max number of rx pkts per phb */
|
85 |
|
|
_u16 rx_limit; /* 0x28 For high / low watermarks */
|
86 |
|
|
_u16 links; /* 0x2A Links to use */
|
87 |
|
|
_u16 timer; /* 0x2C Interrupts per second */
|
88 |
|
|
_u16 rups; /* 0x2E Pointer to the RUPs */
|
89 |
|
|
_u16 max_phb; /* 0x30 Mostly for debugging */
|
90 |
|
|
_u16 living; /* 0x32 Just increments!! */
|
91 |
|
|
_u16 init_done; /* 0x34 Initialisation over */
|
92 |
|
|
_u16 booting_link; /* 0x36 */
|
93 |
|
|
_u16 idle_count; /* 0x38 Idle time counter */
|
94 |
|
|
_u16 busy_count; /* 0x3A Busy counter */
|
95 |
|
|
_u16 idle_control; /* 0x3C Control Idle Process */
|
96 |
|
|
_u16 tx_intr; /* 0x3E TX interrupt pending */
|
97 |
|
|
_u16 rx_intr; /* 0x40 RX interrupt pending */
|
98 |
|
|
_u16 rup_intr; /* 0x42 RUP interrupt pending */
|
99 |
|
|
|
100 |
|
|
} PARM_MAP;
|
101 |
|
|
|
102 |
|
|
/* Same thing again, but defined as offsets... */
|
103 |
|
|
|
104 |
|
|
#define PM_phb_ptr 0x00 /* 0x00 Pointer to the PHB array */
|
105 |
|
|
#define PM_phb_num_ptr 0x02 /* 0x02 Ptr to Number of PHB's */
|
106 |
|
|
#define PM_free_list 0x04 /* 0x04 Free List pointer */
|
107 |
|
|
#define PM_free_list_end 0x06 /* 0x06 Free List End pointer */
|
108 |
|
|
#define PM_q_free_list_ptr 0x08 /* 0x08 Ptr to Q_BUF variable */
|
109 |
|
|
#define PM_unit_id_ptr 0x0A /* 0x0A Unit Id */
|
110 |
|
|
#define PM_link_str_ptr 0x0C /* 0x0C Link Structure Array */
|
111 |
|
|
#define PM_bootloader_1 0x0E /* 0x0E 1st Stage Boot Loader */
|
112 |
|
|
#define PM_bootloader_2 0x10 /* 0x10 2nd Stage Boot Loader */
|
113 |
|
|
#define PM_port_route_map_ptr 0x12 /* 0x12 Port Route Map */
|
114 |
|
|
#define PM_route_ptr 0x14 /* 0x14 Route Map */
|
115 |
|
|
#define PM_map_present 0x16 /* 0x16 Route Map present */
|
116 |
|
|
#define PM_pkt_num 0x18 /* 0x18 Total number of packets */
|
117 |
|
|
#define PM_q_num 0x1A /* 0x1A Total number of Q packets */
|
118 |
|
|
#define PM_buffers_per_port 0x1C /* 0x1C Number of buffers per port */
|
119 |
|
|
#define PM_heap_size 0x1E /* 0x1E Initial size of heap */
|
120 |
|
|
#define PM_heap_left 0x20 /* 0x20 Current Heap left */
|
121 |
|
|
#define PM_error 0x22 /* 0x22 Error code */
|
122 |
|
|
#define PM_tx_max 0x24 /* 0x24 Max number of tx pkts per phb */
|
123 |
|
|
#define PM_rx_max 0x26 /* 0x26 Max number of rx pkts per phb */
|
124 |
|
|
#define PM_rx_limit 0x28 /* 0x28 For high / low watermarks */
|
125 |
|
|
#define PM_links 0x2A /* 0x2A Links to use */
|
126 |
|
|
#define PM_timer 0x2C /* 0x2C Interrupts per second */
|
127 |
|
|
#define PM_rups 0x2E /* 0x2E Pointer to the RUPs */
|
128 |
|
|
#define PM_max_phb 0x30 /* 0x30 Mostly for debugging */
|
129 |
|
|
#define PM_living 0x32 /* 0x32 Just increments!! */
|
130 |
|
|
#define PM_init_done 0x34 /* 0x34 Initialisation over */
|
131 |
|
|
#define PM_booting_link 0x36 /* 0x36 */
|
132 |
|
|
#define PM_idle_count 0x38 /* 0x38 Idle time counter */
|
133 |
|
|
#define PM_busy_count 0x3A /* 0x3A Busy counter */
|
134 |
|
|
#define PM_idle_control 0x3C /* 0x3C Control Idle Process */
|
135 |
|
|
#define PM_tx_intr 0x3E /* 0x4E TX interrupt pending */
|
136 |
|
|
#define PM_rx_intr 0x40 /* 0x40 RX interrupt pending */
|
137 |
|
|
#define PM_rup_intr 0x42 /* 0x42 RUP interrupt pending */
|
138 |
|
|
#define sizeof_PARM_MAP 0x44 /* structure size = 0x44 */
|
139 |
|
|
|
140 |
|
|
/* PARM_MAP.error definitions... */
|
141 |
|
|
#define E_NO_ERROR 0x00
|
142 |
|
|
#define E_PROCESS_NOT_INIT 0x01
|
143 |
|
|
#define E_LINK_TIMEOUT 0x02
|
144 |
|
|
#define E_NO_ROUTE 0x03
|
145 |
|
|
#define E_CONFUSED 0x04
|
146 |
|
|
#define E_HOME 0x05
|
147 |
|
|
#define E_CSUM_FAIL 0x06
|
148 |
|
|
#define E_DISCONNECTED 0x07
|
149 |
|
|
#define E_BAD_RUP 0x08
|
150 |
|
|
#define E_NO_VIRGIN 0x09
|
151 |
|
|
#define E_BOOT_RUP_BUSY 0x10
|
152 |
|
|
#define E_CHANALLOC 0x80
|
153 |
|
|
#define E_POLL_ALLOC 0x81
|
154 |
|
|
#define E_LTTWAKE 0x82
|
155 |
|
|
#define E_LTT_ALLOC 0x83
|
156 |
|
|
#define E_LRT_ALLOC 0x84
|
157 |
|
|
#define E_CIRRUS 0x85
|
158 |
|
|
#define E_MONITOR 0x86
|
159 |
|
|
#define E_PHB_ALLOC 0x87
|
160 |
|
|
#define E_ARRAY_ALLOC 0x88
|
161 |
|
|
#define E_QBUF_ALLOC 0x89
|
162 |
|
|
#define E_PKT_ALLOC 0x8a
|
163 |
|
|
#define E_GET_TX_Q_BUF 0x8b
|
164 |
|
|
#define E_GET_RX_Q_BUF 0x8c
|
165 |
|
|
#define E_MEM_OUT 0x8d
|
166 |
|
|
#define E_MMU_INIT 0x8e
|
167 |
|
|
#define E_LTT_INIT 0x8f
|
168 |
|
|
#define E_LRT_INIT 0x90
|
169 |
|
|
#define E_LINK_RUN 0x91
|
170 |
|
|
#define E_MONITOR_ALLOC 0x92
|
171 |
|
|
#define E_MONITOR_INIT 0x93
|
172 |
|
|
#define E_POLL_INIT 0x94
|
173 |
|
|
|
174 |
|
|
/* PARM_MAP.links definitions... */
|
175 |
|
|
#define RIO_LINK_ENABLE 0x80FF
|
176 |
|
|
|
177 |
|
|
/*****************************************************************************
|
178 |
|
|
********************************** ***********************************
|
179 |
|
|
********************************** RUP ***********************************
|
180 |
|
|
********************************** ***********************************
|
181 |
|
|
*****************************************************************************/
|
182 |
|
|
|
183 |
|
|
/* The RUP (Remote Unit Port) structure relates to the Remote Terminal Adapters
|
184 |
|
|
attached to the system and there is normally an array of MAX_RUPS (=16) structures
|
185 |
|
|
in a host card, defined by PARM_MAP->rup. */
|
186 |
|
|
|
187 |
|
|
typedef struct _RUP
|
188 |
|
|
{
|
189 |
|
|
_u16 txpkt; /* 0x00 Outgoing packet */
|
190 |
|
|
_u16 rxpkt; /* 0x02 ncoming packet */
|
191 |
|
|
_u16 link; /* 0x04 Which link to send packet down ? */
|
192 |
|
|
_u8 rup_dest_unit[2]; /* 0x06 Destination Unit */
|
193 |
|
|
_u16 handshake; /* 0x08 Handshaking */
|
194 |
|
|
_u16 timeout; /* 0x0A Timeout */
|
195 |
|
|
_u16 status; /* 0x0C Status */
|
196 |
|
|
_u16 txcontrol; /* 0x0E Transmit control */
|
197 |
|
|
_u16 rxcontrol; /* 0x10 Receive control */
|
198 |
|
|
|
199 |
|
|
} RUP;
|
200 |
|
|
|
201 |
|
|
/* Same thing again, but defined as offsets... */
|
202 |
|
|
|
203 |
|
|
#define RUP_txpkt 0x00 /* 0x00 Outgoing packet */
|
204 |
|
|
#define RUP_rxpkt 0x02 /* 0x02 Incoming packet */
|
205 |
|
|
#define RUP_link 0x04 /* 0x04 Which link to send packet down ? */
|
206 |
|
|
#define RUP_rup_dest_unit 0x06 /* 0x06 Destination Unit */
|
207 |
|
|
#define RUP_handshake 0x08 /* 0x08 Handshaking */
|
208 |
|
|
#define RUP_timeout 0x0A /* 0x0A Timeout */
|
209 |
|
|
#define RUP_status 0x0C /* 0x0C Status */
|
210 |
|
|
#define RUP_txcontrol 0x0E /* 0x0E Transmit control */
|
211 |
|
|
#define RUP_rxcontrol 0x10 /* 0x10 Receive control */
|
212 |
|
|
#define sizeof_RUP 0x12 /* structure size = 0x12 */
|
213 |
|
|
|
214 |
|
|
#define MAX_RUP 16
|
215 |
|
|
|
216 |
|
|
/* RUP.txcontrol definitions... */
|
217 |
|
|
#define TX_RUP_INACTIVE 0 /* Nothing to transmit */
|
218 |
|
|
#define TX_PACKET_READY 1 /* Transmit packet ready */
|
219 |
|
|
#define TX_LOCK_RUP 2 /* Transmit side locked */
|
220 |
|
|
|
221 |
|
|
/* RUP.txcontrol definitions... */
|
222 |
|
|
#define RX_RUP_INACTIVE 0 /* Nothing received */
|
223 |
|
|
#define RX_PACKET_READY 1 /* Packet received */
|
224 |
|
|
|
225 |
|
|
#define RUP_NO_OWNER 0xFF /* RUP not owned by any process */
|
226 |
|
|
|
227 |
|
|
/*****************************************************************************
|
228 |
|
|
********************************** ***********************************
|
229 |
|
|
********************************** PHB ***********************************
|
230 |
|
|
********************************** ***********************************
|
231 |
|
|
*****************************************************************************/
|
232 |
|
|
|
233 |
|
|
/* The PHB (Port Header Block) structure relates to the serial ports attached
|
234 |
|
|
to the system and there is normally an array of MAX_PHBS (=128) structures
|
235 |
|
|
in a host card, defined by PARM_MAP->phb_ptr and PARM_MAP->phb_num_ptr. */
|
236 |
|
|
|
237 |
|
|
typedef struct _PHB
|
238 |
|
|
{
|
239 |
|
|
_u16 source; /* 0x00 Location of the PHB in the host card */
|
240 |
|
|
_u16 handshake; /* 0x02 Used to manage receive packet flow control */
|
241 |
|
|
_u16 status; /* 0x04 Internal port transmit/receive status */
|
242 |
|
|
_u16 timeout; /* 0x06 Time period to wait for an ACK */
|
243 |
|
|
_u16 link; /* 0x08 The host link associated with the PHB */
|
244 |
|
|
_u16 destination; /* 0x0A Location of the remote port on the network */
|
245 |
|
|
|
246 |
|
|
_u16 tx_start; /* 0x0C first entry in the packet array for transmit packets */
|
247 |
|
|
_u16 tx_end; /* 0x0E last entry in the packet array for transmit packets */
|
248 |
|
|
_u16 tx_add; /* 0x10 position in the packet array for new transmit packets */
|
249 |
|
|
_u16 tx_remove; /* 0x12 current position in the packet pointer array */
|
250 |
|
|
|
251 |
|
|
_u16 rx_start; /* 0x14 first entry in the packet array for receive packets */
|
252 |
|
|
_u16 rx_end; /* 0x16 last entry in the packet array for receive packets */
|
253 |
|
|
_u16 rx_add; /* 0x18 position in the packet array for new receive packets */
|
254 |
|
|
_u16 rx_remove; /* 0x1A current position in the packet pointer array */
|
255 |
|
|
|
256 |
|
|
} PHB;
|
257 |
|
|
|
258 |
|
|
/* Same thing again, but defined as offsets... */
|
259 |
|
|
|
260 |
|
|
#define PHB_source 0x00 /* 0x00 Location of the PHB in the host card */
|
261 |
|
|
#define PHB_handshake 0x02 /* 0x02 Used to manage receive packet flow control */
|
262 |
|
|
#define PHB_status 0x04 /* 0x04 Internal port transmit/receive status */
|
263 |
|
|
#define PHB_timeout 0x06 /* 0x06 Time period to wait for an ACK */
|
264 |
|
|
#define PHB_link 0x08 /* 0x08 The host link associated with the PHB */
|
265 |
|
|
#define PHB_destination 0x0A /* 0x0A Location of the remote port on the network */
|
266 |
|
|
#define PHB_tx_start 0x0C /* 0x0C first entry in the packet array for transmit packets */
|
267 |
|
|
#define PHB_tx_end 0x0E /* 0x0E last entry in the packet array for transmit packets */
|
268 |
|
|
#define PHB_tx_add 0x10 /* 0x10 position in the packet array for new transmit packets */
|
269 |
|
|
#define PHB_tx_remove 0x12 /* 0x12 current position in the packet pointer array */
|
270 |
|
|
#define PHB_rx_start 0x14 /* 0x14 first entry in the packet array for receive packets */
|
271 |
|
|
#define PHB_rx_end 0x16 /* 0x16 last entry in the packet array for receive packets */
|
272 |
|
|
#define PHB_rx_add 0x18 /* 0x18 position in the packet array for new receive packets */
|
273 |
|
|
#define PHB_rx_remove 0x1A /* 0x1A current position in the packet pointer array */
|
274 |
|
|
#define sizeof_PHB 0x1C /* structure size = 0x1C */
|
275 |
|
|
|
276 |
|
|
/* PHB.handshake definitions... */
|
277 |
|
|
#define PHB_HANDSHAKE_SET 0x0001 /* Set by LRT */
|
278 |
|
|
#define PHB_HANDSHAKE_RESET 0x0002 /* Set by ISR / driver */
|
279 |
|
|
#define PHB_HANDSHAKE_FLAGS (PHB_HANDSHAKE_RESET|PHB_HANDSHAKE_SET)
|
280 |
|
|
/* Reset by ltt */
|
281 |
|
|
|
282 |
|
|
#define MAX_PHB 128 /* range 0-127 */
|
283 |
|
|
|
284 |
|
|
/*****************************************************************************
|
285 |
|
|
********************************** ***********************************
|
286 |
|
|
********************************** LPB ***********************************
|
287 |
|
|
********************************** ***********************************
|
288 |
|
|
*****************************************************************************/
|
289 |
|
|
|
290 |
|
|
/* The LPB (Link Parameter Block) structure relates to a RIO Network Link
|
291 |
|
|
and there is normally an array of MAX_LINKS (=4) structures in a host card,
|
292 |
|
|
defined by PARM_MAP->link_str_ptr. */
|
293 |
|
|
|
294 |
|
|
typedef struct _LPB
|
295 |
|
|
{
|
296 |
|
|
_u16 link_number; /* 0x00 Link Number */
|
297 |
|
|
_u16 in_ch; /* 0x02 Link In Channel */
|
298 |
|
|
_u16 out_ch; /* 0x04 Link Out Channel */
|
299 |
|
|
_u8 attached_serial[4]; /* 0x06 Attached serial number */
|
300 |
|
|
_u8 attached_host_serial[4];/* 0x0A Serial number of Host who booted other end */
|
301 |
|
|
_u16 descheduled; /* 0x0E Currently Descheduled */
|
302 |
|
|
_u16 state; /* 0x10 Current state */
|
303 |
|
|
_u16 send_poll; /* 0x12 Send a Poll Packet */
|
304 |
|
|
_u16 ltt_p; /* 0x14 Process Descriptor */
|
305 |
|
|
_u16 lrt_p; /* 0x16 Process Descriptor */
|
306 |
|
|
_u16 lrt_status; /* 0x18 Current lrt status */
|
307 |
|
|
_u16 ltt_status; /* 0x1A Current ltt status */
|
308 |
|
|
_u16 timeout; /* 0x1C Timeout value */
|
309 |
|
|
_u16 topology; /* 0x1E Topology bits */
|
310 |
|
|
_u16 mon_ltt; /* 0x20 */
|
311 |
|
|
_u16 mon_lrt; /* 0x22 */
|
312 |
|
|
_u16 num_pkts; /* 0x24 */
|
313 |
|
|
_u16 add_packet_list; /* 0x26 Add packets to here */
|
314 |
|
|
_u16 remove_packet_list; /* 0x28 Send packets from here */
|
315 |
|
|
|
316 |
|
|
_u16 lrt_fail_chan; /* 0x2A Lrt's failure channel */
|
317 |
|
|
_u16 ltt_fail_chan; /* 0x2C Ltt's failure channel */
|
318 |
|
|
|
319 |
|
|
RUP rup; /* 0x2E RUP structure for HOST to driver comms */
|
320 |
|
|
RUP link_rup; /* 0x40 RUP for the link (POLL, topology etc.) */
|
321 |
|
|
_u16 attached_link; /* 0x52 Number of attached link */
|
322 |
|
|
_u16 csum_errors; /* 0x54 csum errors */
|
323 |
|
|
_u16 num_disconnects; /* 0x56 number of disconnects */
|
324 |
|
|
_u16 num_sync_rcvd; /* 0x58 # sync's received */
|
325 |
|
|
_u16 num_sync_rqst; /* 0x5A # sync requests */
|
326 |
|
|
_u16 num_tx; /* 0x5C Num pkts sent */
|
327 |
|
|
_u16 num_rx; /* 0x5E Num pkts received */
|
328 |
|
|
_u16 module_attached; /* 0x60 Module tpyes of attached */
|
329 |
|
|
_u16 led_timeout; /* 0x62 LED timeout */
|
330 |
|
|
_u16 first_port; /* 0x64 First port to service */
|
331 |
|
|
_u16 last_port; /* 0x66 Last port to service */
|
332 |
|
|
|
333 |
|
|
} LPB;
|
334 |
|
|
|
335 |
|
|
/* Same thing again, but defined as offsets... */
|
336 |
|
|
|
337 |
|
|
#define LPB_link_number 0x00 /* 0x00 Link Number */
|
338 |
|
|
#define LPB_in_ch 0x02 /* 0x02 Link In Channel */
|
339 |
|
|
#define LPB_out_ch 0x04 /* 0x04 Link Out Channel */
|
340 |
|
|
#define LPB_attached_serial 0x06 /* 0x06 Attached serial number */
|
341 |
|
|
#define LPB_attached_host_serial 0x0A /* 0x0A Serial number of Host who booted other end */
|
342 |
|
|
#define LPB_descheduled 0x0E /* 0x0E Currently Descheduled */
|
343 |
|
|
#define LPB_state 0x10 /* 0x10 Current state */
|
344 |
|
|
#define LPB_send_poll 0x12 /* 0x12 Send a Poll Packet */
|
345 |
|
|
#define LPB_ltt_p 0x14 /* 0x14 Process Descriptor */
|
346 |
|
|
#define LPB_lrt_p 0x16 /* 0x16 Process Descriptor */
|
347 |
|
|
#define LPB_lrt_status 0x18 /* 0x18 Current lrt status */
|
348 |
|
|
#define LPB_ltt_status 0x1A /* 0x1A Current ltt status */
|
349 |
|
|
#define LPB_timeout 0x1C /* 0x1C Timeout value */
|
350 |
|
|
#define LPB_topology 0x1E /* 0x1E Topology bits */
|
351 |
|
|
#define LPB_mon_ltt 0x20 /* 0x20 */
|
352 |
|
|
#define LPB_mon_lrt 0x22 /* 0x22 */
|
353 |
|
|
#define LPB_num_pkts 0x24 /* 0x24 */
|
354 |
|
|
#define LPB_add_packet_list 0x26 /* 0x26 Add packets to here */
|
355 |
|
|
#define LPB_remove_packet_list 0x28 /* 0x28 Send packets from here */
|
356 |
|
|
#define LPB_lrt_fail_chan 0x2A /* 0x2A Lrt's failure channel */
|
357 |
|
|
#define LPB_ltt_fail_chan 0x2C /* 0x2C Ltt's failure channel */
|
358 |
|
|
#define LPB_rup 0x2E /* 0x2E RUP structure for HOST to driver comms */
|
359 |
|
|
#define LPB_link_rup 0x40 /* 0x40 RUP for the link (POLL, topology etc.) */
|
360 |
|
|
#define LPB_attached_link 0x52 /* 0x52 Number of attached link */
|
361 |
|
|
#define LPB_csum_errors 0x54 /* 0x54 csum errors */
|
362 |
|
|
#define LPB_num_disconnects 0x56 /* 0x56 number of disconnects */
|
363 |
|
|
#define LPB_num_sync_rcvd 0x58 /* 0x58 # sync's received */
|
364 |
|
|
#define LPB_num_sync_rqst 0x5A /* 0x5A # sync requests */
|
365 |
|
|
#define LPB_num_tx 0x5C /* 0x5C Num pkts sent */
|
366 |
|
|
#define LPB_num_rx 0x5E /* 0x5E Num pkts received */
|
367 |
|
|
#define LPB_module_attached 0x60 /* 0x60 Module tpyes of attached */
|
368 |
|
|
#define LPB_led_timeout 0x62 /* 0x62 LED timeout */
|
369 |
|
|
#define LPB_first_port 0x64 /* 0x64 First port to service */
|
370 |
|
|
#define LPB_last_port 0x66 /* 0x66 Last port to service */
|
371 |
|
|
#define sizeof_LPB 0x68 /* structure size = 0x68 */
|
372 |
|
|
|
373 |
|
|
#define LINKS_PER_UNIT 4 /* number of links from a host */
|
374 |
|
|
|
375 |
|
|
/*****************************************************************************
|
376 |
|
|
******************************** *******************************
|
377 |
|
|
******************************** FREE_LIST *******************************
|
378 |
|
|
******************************** *******************************
|
379 |
|
|
*****************************************************************************/
|
380 |
|
|
|
381 |
|
|
/* Used to overlay packet headers when allocating/freeing packets from the free list */
|
382 |
|
|
|
383 |
|
|
typedef struct _FREE_LIST
|
384 |
|
|
{
|
385 |
|
|
_u16 next; /* 0x00 offset of next list item */
|
386 |
|
|
_u16 prev; /* 0x02 offset of previous list item */
|
387 |
|
|
|
388 |
|
|
} FREE_LIST;
|
389 |
|
|
|
390 |
|
|
/* Same thing again, but defined as offsets... */
|
391 |
|
|
|
392 |
|
|
#define FL_next 0x00 /* 0x00 offset of next list item */
|
393 |
|
|
#define FL_prev 0x02 /* 0x02 offset of previous list item */
|
394 |
|
|
|
395 |
|
|
/*****************************************************************************
|
396 |
|
|
********************************** ***********************************
|
397 |
|
|
********************************** PKT ***********************************
|
398 |
|
|
********************************** ***********************************
|
399 |
|
|
*****************************************************************************/
|
400 |
|
|
|
401 |
|
|
/* The PKT is the main unit of communication between Host Cards and RTAs across
|
402 |
|
|
the RIO network. */
|
403 |
|
|
|
404 |
|
|
#define PKT_MAX_DATA_LEN 72 /* Size of packet data */
|
405 |
|
|
|
406 |
|
|
typedef struct _PKT
|
407 |
|
|
{
|
408 |
|
|
_u8 dest_unit; /* 0x00 Destination Unit Id */
|
409 |
|
|
_u8 dest_port; /* 0x01 Destination Port */
|
410 |
|
|
_u8 src_unit; /* 0x02 Source Unit Id */
|
411 |
|
|
_u8 src_port; /* 0x03 Source Port */
|
412 |
|
|
_u8 len; /* 0x04 Length (in bytes) of data field */
|
413 |
|
|
_u8 control; /* 0x05 */
|
414 |
|
|
_u8 data[PKT_MAX_DATA_LEN]; /* 0x06 Actual data */
|
415 |
|
|
_u16 csum; /* 0x4E C-SUM */
|
416 |
|
|
|
417 |
|
|
} PKT;
|
418 |
|
|
|
419 |
|
|
/* Same thing again, but defined as offsets... */
|
420 |
|
|
|
421 |
|
|
#define PKT_dest_unit 0x00 /* 0x00 Destination Unit Id */
|
422 |
|
|
#define PKT_dest_port 0x01 /* 0x01 Destination Port */
|
423 |
|
|
#define PKT_src_unit 0x02 /* 0x02 Source Unit Id */
|
424 |
|
|
#define PKT_src_port 0x03 /* 0x03 Source Port */
|
425 |
|
|
#define PKT_len 0x04 /* 0x04 Length (in bytes) of data field */
|
426 |
|
|
#define PKT_control 0x05 /* 0x05 */
|
427 |
|
|
#define PKT_data 0x06 /* 0x06 Actual data */
|
428 |
|
|
#define PKT_csum 0x4E /* 0x4E C-SUM */
|
429 |
|
|
#define sizeof_PKT 0x50 /* structure size = 0x50 */
|
430 |
|
|
|
431 |
|
|
/* PKT.len definitions... */
|
432 |
|
|
#define PKT_CMD_BIT 0x80
|
433 |
|
|
#define PKT_CMD_DATA 0x80
|
434 |
|
|
#define PKT_LEN_MASK 0x7F
|
435 |
|
|
|
436 |
|
|
/* PKT.control definitions... */
|
437 |
|
|
#define PKT_ACK 0x40
|
438 |
|
|
#define PKT_TGL 0x20
|
439 |
|
|
#define DATA_WNDW 0x10
|
440 |
|
|
#define PKT_TTL_MASK 0x0F
|
441 |
|
|
#define MAX_TTL 0x0F
|
442 |
|
|
|
443 |
|
|
/*****************************************************************************
|
444 |
|
|
***************************** ****************************
|
445 |
|
|
***************************** Control Packets ****************************
|
446 |
|
|
***************************** ****************************
|
447 |
|
|
*****************************************************************************/
|
448 |
|
|
|
449 |
|
|
/* The following definitions and structures define the control packets sent
|
450 |
|
|
between the driver and RIO Ports, RTAs and Host Cards. */
|
451 |
|
|
|
452 |
|
|
#define PRE_EMPTIVE 0x80 /* Pre-emptive command (sent via port's RUP) */
|
453 |
|
|
|
454 |
|
|
/* "in-band" and "pre-emptive" port commands... */
|
455 |
|
|
#define OPEN 0x00 /* Driver->RIO Open a port */
|
456 |
|
|
#define CONFIG 0x01 /* Driver->RIO Configure a port */
|
457 |
|
|
#define MOPEN 0x02 /* Driver->RIO Modem open (wait for DCD) */
|
458 |
|
|
#define CLOSE 0x03 /* Driver->RIO Close a port */
|
459 |
|
|
#define WFLUSH (0x04|PRE_EMPTIVE) /* Driver->RIO Write flush */
|
460 |
|
|
#define RFLUSH (0x05|PRE_EMPTIVE) /* Driver->RIO Read flush */
|
461 |
|
|
#define RESUME (0x06|PRE_EMPTIVE) /* Driver->RIO Behave as if XON received */
|
462 |
|
|
#define SBREAK 0x07 /* Driver->RIO Start break */
|
463 |
|
|
#define EBREAK 0x08 /* Driver->RIO End break */
|
464 |
|
|
#define SUSPEND (0x09|PRE_EMPTIVE) /* Driver->RIO Behave as if XOFF received */
|
465 |
|
|
#define FCLOSE (0x0A|PRE_EMPTIVE) /* Driver->RIO Force close */
|
466 |
|
|
#define XPRINT 0x0B /* Driver->RIO Xprint packet */
|
467 |
|
|
#define MBIS (0x0C|PRE_EMPTIVE) /* Driver->RIO Set modem lines */
|
468 |
|
|
#define MBIC (0x0D|PRE_EMPTIVE) /* Driver->RIO Clear modem lines */
|
469 |
|
|
#define MSET (0x0E|PRE_EMPTIVE) /* Driver->RIO Set modem lines */
|
470 |
|
|
#define PCLOSE 0x0F /* Driver->RIO Pseudo close */
|
471 |
|
|
#define MGET (0x10|PRE_EMPTIVE) /* Driver->RIO Force update of modem status */
|
472 |
|
|
#define MEMDUMP (0x11|PRE_EMPTIVE) /* Driver->RIO DEBUG request for RTA memory */
|
473 |
|
|
#define READ_REGISTER (0x12|PRE_EMPTIVE) /* Driver->RIO DEBUG read CD1400 register */
|
474 |
|
|
|
475 |
|
|
/* Remote Unit Port (RUP) packet definitions... (specified in PKT.dest_unit and PKT.src_unit) */
|
476 |
|
|
#define SYNC_RUP 0xFF /* Download internal */
|
477 |
|
|
#define COMMAND_RUP 0xFE /* Command ack/status */
|
478 |
|
|
#define ERROR_RUP 0xFD /* Download internal */
|
479 |
|
|
#define POLL_RUP 0xFC /* Download internal */
|
480 |
|
|
#define BOOT_RUP 0xFB /* Used to boot RTAs */
|
481 |
|
|
#define ROUTE_RUP 0xFA /* Used to specify routing/topology */
|
482 |
|
|
#define STATUS_RUP 0xF9 /* Not used */
|
483 |
|
|
#define POWER_RUP 0xF8 /* Download internal */
|
484 |
|
|
|
485 |
|
|
/* COMMAND_RUP definitions... */
|
486 |
|
|
#define COMPLETE (0x20|PRE_EMPTIVE) /* RIO->Driver Command complete */
|
487 |
|
|
#define BREAK_RECEIVED (0x21|PRE_EMPTIVE) /* RIO->Driver Break received */
|
488 |
|
|
#define MODEM_STATUS (0x22|PRE_EMPTIVE) /* RIO->Driver Modem status change */
|
489 |
|
|
|
490 |
|
|
/* BOOT_RUP definitions... */
|
491 |
|
|
#define BOOT_REQUEST 0x00 /* RIO->Driver Request for boot */
|
492 |
|
|
#define BOOT_ABORT 0x01 /* Driver->RIO Abort a boot */
|
493 |
|
|
#define BOOT_SEQUENCE 0x02 /* Driver->RIO Packet with firmware details */
|
494 |
|
|
#define BOOT_COMPLETED 0x03 /* RIO->Driver Boot completed */
|
495 |
|
|
#define IFOAD 0x2F /* Driver->RIO Shutdown/Reboot RTA (Fall Over And Die) */
|
496 |
|
|
#define IDENTIFY 0x30 /* Driver->RIO Identify RTA */
|
497 |
|
|
#define ZOMBIE 0x31 /* Driver->RIO Shutdown/Flash LEDs */
|
498 |
|
|
#define UFOAD 0x32 /* Driver->RIO Shutdown/Reboot neighbouring RTA */
|
499 |
|
|
#define IWAIT 0x33 /* Driver->RIO Pause booting process */
|
500 |
|
|
|
501 |
|
|
/* ROUTE_RUP definitions... */
|
502 |
|
|
#define ROUTE_REQUEST 0x00 /* RIO->Driver Request an ID */
|
503 |
|
|
#define ROUTE_FOAD 0x01 /* Driver->RIO Shutdown/reboot RTA */
|
504 |
|
|
#define ROUTE_ALREADY 0x02 /* Driver->RIO Not used */
|
505 |
|
|
#define ROUTE_USED 0x03 /* Driver->RIO Not used */
|
506 |
|
|
#define ROUTE_ALLOCATE 0x04 /* Driver->RIO Allocate RTA RUP numbers */
|
507 |
|
|
#define ROUTE_REQ_TOP 0x05 /* Driver->RIO Not used */
|
508 |
|
|
#define ROUTE_TOPOLOGY 0x06 /* RIO->Driver Route/Topology status */
|
509 |
|
|
|
510 |
|
|
/*****************************************************************************
|
511 |
|
|
********************************** **********************************
|
512 |
|
|
********************************** OPEN **********************************
|
513 |
|
|
********************************** **********************************
|
514 |
|
|
*****************************************************************************/
|
515 |
|
|
|
516 |
|
|
/* (Driver->RIO,in-band)
|
517 |
|
|
|
518 |
|
|
Sent to open a port.
|
519 |
|
|
Structure of configuration info used with OPEN, CONFIG and MOPEN packets... */
|
520 |
|
|
|
521 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
522 |
|
|
#define PKT_Cor1 (PKT_Data+1) /* Channel Option Register 1 */
|
523 |
|
|
#define PKT_Cor2 (PKT_Data+2) /* Channel Option Register 2 */
|
524 |
|
|
#define PKT_Cor4 (PKT_Data+3) /* Channel Option Register 4 */
|
525 |
|
|
#define PKT_Cor5 (PKT_Data+4) /* Channel Option Register 5 */
|
526 |
|
|
#define PKT_TxXon (PKT_Data+5) /* Transmit XON character */
|
527 |
|
|
#define PKT_TxXoff (PKT_Data+6) /* Transmit XOFF character */
|
528 |
|
|
#define PKT_RxXon (PKT_Data+7) /* Receive XON character */
|
529 |
|
|
#define PKT_RxXoff (PKT_Data+8) /* Receive XOFF character */
|
530 |
|
|
#define PKT_Lnext (PKT_Data+9) /* Lnext character */
|
531 |
|
|
#define PKT_TxBaud (PKT_Data+10) /* Transmit baud rate */
|
532 |
|
|
#define PKT_RxBaud (PKT_Data+11) /* Receive baud rate */
|
533 |
|
|
|
534 |
|
|
/* COR1 definitions... */
|
535 |
|
|
#define COR1_PARITY 0xE0 /* Parity mask */
|
536 |
|
|
#define COR1_NONE 0x00 /* No parity */
|
537 |
|
|
#define COR1_SPACE 0x20 /* Space parity */
|
538 |
|
|
#define COR1_EVEN 0x40 /* Even parity */
|
539 |
|
|
#define COR1_MARK 0xA0 /* Mark parity */
|
540 |
|
|
#define COR1_ODD 0xC0 /* Odd parity */
|
541 |
|
|
|
542 |
|
|
#define COR1_STOPBITS 0x0C /* Stop bits mask */
|
543 |
|
|
#define COR1_STOP1 0x00 /* 1 stop bit */
|
544 |
|
|
#define COR1_STOP1_5 0x04 /* 1.5 stop bits */
|
545 |
|
|
#define COR1_STOP2 0x08 /* 2 stop bits */
|
546 |
|
|
|
547 |
|
|
#define COR1_DATABITS 0x03 /* Data bits mask */
|
548 |
|
|
#define COR1_DATA5 0x00 /* 5 data bits */
|
549 |
|
|
#define COR1_DATA6 0x01 /* 6 data bits */
|
550 |
|
|
#define COR1_DATA7 0x02 /* 7 data bits */
|
551 |
|
|
#define COR1_DATA8 0x03 /* 8 data bits */
|
552 |
|
|
|
553 |
|
|
/* COR2 definitions... */
|
554 |
|
|
#define COR2_XON_TXFLOW 0x40 /* XON/XOFF Transmit Flow */
|
555 |
|
|
#define COR2_XANY_TXFLOW 0xC0 /* XON/XANY Transmit Flow */
|
556 |
|
|
#define COR2_HUPCL 0x20 /* Hang Up On Close */
|
557 |
|
|
#define COR2_DSR_TXFLOW 0x08 /* DSR Transmit Flow Control */
|
558 |
|
|
#define COR2_RTS_RXFLOW 0x04 /* RTS Receive Flow Control */
|
559 |
|
|
#define COR2_CTS_TXFLOW 0x02 /* CTS Transmit Flow Control */
|
560 |
|
|
#define COR2_XON_RXFLOW 0x01 /* XON/XOFF Receive Flow */
|
561 |
|
|
|
562 |
|
|
/* COR4 definition... */
|
563 |
|
|
#define COR4_IGNCR 0x80 /* Discard received CR */
|
564 |
|
|
#define COR4_ICRNL 0x40 /* Map received CR -> NL */
|
565 |
|
|
#define COR4_INLCR 0x20 /* Map received NL -> CR */
|
566 |
|
|
#define COR4_IGNBRK 0x10 /* Ignore Received Break */
|
567 |
|
|
#define COR4_NBRKINT 0x08 /* No interrupt on rx Break */
|
568 |
|
|
#define COR4_IGNPAR 0x04 /* ignore rx parity error chars */
|
569 |
|
|
#define COR4_PARMRK 0x02 /* Mark rx parity error chars */
|
570 |
|
|
#define COR4_RAISEMOD 0x01 /* Raise modem lines on !0 baud */
|
571 |
|
|
|
572 |
|
|
/* COR5 definitions... */
|
573 |
|
|
#define COR5_ISTRIP 0x80 /* Strip input chars to 7 bits */
|
574 |
|
|
#define COR5_LNE 0x40 /* Enable LNEXT processing */
|
575 |
|
|
#define COR5_CMOE 0x20 /* Match good & error characters */
|
576 |
|
|
#define COR5_TAB3 0x10 /* TAB3 mode */
|
577 |
|
|
#define COR5_TSTATE_ON 0x08 /* Enable tbusy/tstop monitoring */
|
578 |
|
|
#define COR5_TSTATE_OFF 0x04 /* Disable tbusy/tstop monitoring */
|
579 |
|
|
#define COR5_ONLCR 0x02 /* NL -> CR NL on output */
|
580 |
|
|
#define COR5_OCRNL 0x01 /* CR -> NL on output */
|
581 |
|
|
|
582 |
|
|
/* RxBaud and TxBaud definitions... */
|
583 |
|
|
#define RIO_B0 0x00 /* RTS / DTR signals dropped */
|
584 |
|
|
#define RIO_B50 0x01 /* 50 baud */
|
585 |
|
|
#define RIO_B75 0x02 /* 75 baud */
|
586 |
|
|
#define RIO_B110 0x03 /* 110 baud */
|
587 |
|
|
#define RIO_B134 0x04 /* 134.5 baud */
|
588 |
|
|
#define RIO_B150 0x05 /* 150 baud */
|
589 |
|
|
#define RIO_B200 0x06 /* 200 baud */
|
590 |
|
|
#define RIO_B300 0x07 /* 300 baud */
|
591 |
|
|
#define RIO_B600 0x08 /* 600 baud */
|
592 |
|
|
#define RIO_B1200 0x09 /* 1200 baud */
|
593 |
|
|
#define RIO_B1800 0x0A /* 1800 baud */
|
594 |
|
|
#define RIO_B2400 0x0B /* 2400 baud */
|
595 |
|
|
#define RIO_B4800 0x0C /* 4800 baud */
|
596 |
|
|
#define RIO_B9600 0x0D /* 9600 baud */
|
597 |
|
|
#define RIO_B19200 0x0E /* 19200 baud */
|
598 |
|
|
#define RIO_B38400 0x0F /* 38400 baud */
|
599 |
|
|
#define RIO_B56000 0x10 /* 56000 baud */
|
600 |
|
|
#define RIO_B57600 0x11 /* 57600 baud */
|
601 |
|
|
#define RIO_B64000 0x12 /* 64000 baud */
|
602 |
|
|
#define RIO_B115200 0x13 /* 115200 baud */
|
603 |
|
|
#define RIO_B2000 0x14 /* 2000 baud */
|
604 |
|
|
|
605 |
|
|
/*****************************************************************************
|
606 |
|
|
********************************* *********************************
|
607 |
|
|
********************************* CONFIG *********************************
|
608 |
|
|
********************************* *********************************
|
609 |
|
|
*****************************************************************************/
|
610 |
|
|
|
611 |
|
|
/* (Driver->RIO,in-band)
|
612 |
|
|
|
613 |
|
|
CONFIG is sent from the driver to configure an already opened port.
|
614 |
|
|
Packet structure is same as OPEN. */
|
615 |
|
|
|
616 |
|
|
/*****************************************************************************
|
617 |
|
|
********************************* **********************************
|
618 |
|
|
********************************* MOPEN **********************************
|
619 |
|
|
********************************* **********************************
|
620 |
|
|
*****************************************************************************/
|
621 |
|
|
|
622 |
|
|
/* (Driver->RIO,in-band)
|
623 |
|
|
|
624 |
|
|
MOPEN is sent from the driver to open a port attached to a modem. (in-band)
|
625 |
|
|
Packet structure is same as OPEN. */
|
626 |
|
|
|
627 |
|
|
/*****************************************************************************
|
628 |
|
|
********************************* **********************************
|
629 |
|
|
********************************* CLOSE **********************************
|
630 |
|
|
********************************* **********************************
|
631 |
|
|
*****************************************************************************/
|
632 |
|
|
|
633 |
|
|
/* (Driver->RIO,in-band)
|
634 |
|
|
|
635 |
|
|
CLOSE is sent from the driver to close a previously opened port.
|
636 |
|
|
No parameters.
|
637 |
|
|
*/
|
638 |
|
|
#if 0
|
639 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
640 |
|
|
#endif
|
641 |
|
|
/*****************************************************************************
|
642 |
|
|
********************************* *********************************
|
643 |
|
|
********************************* WFLUSH *********************************
|
644 |
|
|
********************************* *********************************
|
645 |
|
|
*****************************************************************************/
|
646 |
|
|
|
647 |
|
|
/* (Driver->RIO,pre-emptive)
|
648 |
|
|
|
649 |
|
|
WFLUSH is sent pre-emptively from the driver to flush the write buffers and
|
650 |
|
|
packets of a port. (pre-emptive)
|
651 |
|
|
|
652 |
|
|
WFLUSH is also sent in-band from the driver to a port as a marker to end
|
653 |
|
|
write flushing previously started by a pre-emptive WFLUSH packet. (in-band)
|
654 |
|
|
*/
|
655 |
|
|
#if 0
|
656 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
657 |
|
|
#endif
|
658 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
659 |
|
|
|
660 |
|
|
/*****************************************************************************
|
661 |
|
|
********************************* *********************************
|
662 |
|
|
********************************* RFLUSH *********************************
|
663 |
|
|
********************************* *********************************
|
664 |
|
|
*****************************************************************************/
|
665 |
|
|
|
666 |
|
|
/* (Driver->RIO,pre-emptive)
|
667 |
|
|
|
668 |
|
|
RFLUSH is sent pre-emptively from the driver to flush the read buffers and
|
669 |
|
|
packets of a port.
|
670 |
|
|
*/
|
671 |
|
|
#if 0
|
672 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
673 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
674 |
|
|
#endif
|
675 |
|
|
|
676 |
|
|
/*****************************************************************************
|
677 |
|
|
********************************* *********************************
|
678 |
|
|
********************************* RESUME *********************************
|
679 |
|
|
********************************* *********************************
|
680 |
|
|
*****************************************************************************/
|
681 |
|
|
|
682 |
|
|
/* (Driver->RIO,pre-emptive)
|
683 |
|
|
|
684 |
|
|
RESUME is sent pre-emptively from the driver to cause a port to resume
|
685 |
|
|
transmission of data if blocked by XOFF. (as if XON had been received)
|
686 |
|
|
*/
|
687 |
|
|
#if 0
|
688 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
689 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
690 |
|
|
#endif
|
691 |
|
|
|
692 |
|
|
/*****************************************************************************
|
693 |
|
|
********************************* *********************************
|
694 |
|
|
********************************* SBREAK *********************************
|
695 |
|
|
********************************* *********************************
|
696 |
|
|
*****************************************************************************/
|
697 |
|
|
|
698 |
|
|
/* (Driver->RIO,in-band)
|
699 |
|
|
|
700 |
|
|
SBREAK is sent in-band from the driver to a port to suspend data and start
|
701 |
|
|
break signal transmission.
|
702 |
|
|
|
703 |
|
|
If the break delay is 0, the break signal will be acknowledged with a
|
704 |
|
|
RUP_COMMAND, COMPLETE packet and continue until an EBREAK packet is received.
|
705 |
|
|
|
706 |
|
|
Otherwise, there is no acknowledgement and the break signal will last for the
|
707 |
|
|
specified number of mS.
|
708 |
|
|
*/
|
709 |
|
|
#if 0
|
710 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
711 |
|
|
#endif
|
712 |
|
|
#define PKT_BreakDelay (PKT_Data+1) /* Break delay in mS */
|
713 |
|
|
|
714 |
|
|
/*****************************************************************************
|
715 |
|
|
********************************* *********************************
|
716 |
|
|
********************************* EBREAK *********************************
|
717 |
|
|
********************************* *********************************
|
718 |
|
|
*****************************************************************************/
|
719 |
|
|
|
720 |
|
|
/* (Driver->RIO,in-band)
|
721 |
|
|
|
722 |
|
|
EBREAK is sent in-band from the driver to a port to stop transmission of a
|
723 |
|
|
break signal.
|
724 |
|
|
|
725 |
|
|
No parameters. */
|
726 |
|
|
|
727 |
|
|
/*****************************************************************************
|
728 |
|
|
********************************* ********************************
|
729 |
|
|
********************************* SUSPEND ********************************
|
730 |
|
|
********************************* ********************************
|
731 |
|
|
*****************************************************************************/
|
732 |
|
|
|
733 |
|
|
/* (Driver->RIO,pre-emptive)
|
734 |
|
|
|
735 |
|
|
SUSPEND is sent pre-emptively from the driver to cause a port to suspend
|
736 |
|
|
transmission of data. (as if XOFF had been received)
|
737 |
|
|
*/
|
738 |
|
|
#if 0
|
739 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
740 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
741 |
|
|
#endif
|
742 |
|
|
|
743 |
|
|
/*****************************************************************************
|
744 |
|
|
********************************* *********************************
|
745 |
|
|
********************************* FCLOSE *********************************
|
746 |
|
|
********************************* *********************************
|
747 |
|
|
*****************************************************************************/
|
748 |
|
|
|
749 |
|
|
/* (Driver->RIO,pre-emptive)
|
750 |
|
|
|
751 |
|
|
FCLOSE is sent pre-emptively from the driver to force close a port.
|
752 |
|
|
A force close flushes receive and transmit queues, and also lowers all output
|
753 |
|
|
modem signals if the COR5_HUPCL (Hang Up On Close) flag is set.
|
754 |
|
|
*/
|
755 |
|
|
#if 0
|
756 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
757 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
758 |
|
|
#endif
|
759 |
|
|
|
760 |
|
|
/*****************************************************************************
|
761 |
|
|
********************************* *********************************
|
762 |
|
|
********************************* XPRINT *********************************
|
763 |
|
|
********************************* *********************************
|
764 |
|
|
*****************************************************************************/
|
765 |
|
|
|
766 |
|
|
/* (Driver->RIO,in-band)
|
767 |
|
|
|
768 |
|
|
XPRINT is sent as a normal I/O data packet except that the PKT_CMD_BIT of
|
769 |
|
|
the "len" field is set, and the first "data" byte is XPRINT.
|
770 |
|
|
|
771 |
|
|
The I/O data in the XPRINT packet will contain the following:
|
772 |
|
|
- Transparent Print Start Sequence
|
773 |
|
|
- Transparent Print Data
|
774 |
|
|
- Transparent Print Stop Sequence.
|
775 |
|
|
*/
|
776 |
|
|
#if 0
|
777 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
778 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
779 |
|
|
#endif
|
780 |
|
|
|
781 |
|
|
/*****************************************************************************
|
782 |
|
|
********************************** **********************************
|
783 |
|
|
********************************** MBIS **********************************
|
784 |
|
|
********************************** **********************************
|
785 |
|
|
*****************************************************************************/
|
786 |
|
|
|
787 |
|
|
/* (Driver->RIO,pre-emptive)
|
788 |
|
|
|
789 |
|
|
MBIS is sent pre-emptively from the driver to set a port's modem signals.
|
790 |
|
|
*/
|
791 |
|
|
#if 0
|
792 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
793 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
794 |
|
|
#endif
|
795 |
|
|
#define PKT_ModemSet (PKT_Data+4) /* Modem set signals mask */
|
796 |
|
|
|
797 |
|
|
/* ModemSet definitions... */
|
798 |
|
|
#define MBIS_RTS 0x01 /* RTS modem signal */
|
799 |
|
|
#define MBIS_DTR 0x02 /* DTR modem signal */
|
800 |
|
|
|
801 |
|
|
/*****************************************************************************
|
802 |
|
|
********************************** **********************************
|
803 |
|
|
********************************** MBIC **********************************
|
804 |
|
|
********************************** **********************************
|
805 |
|
|
*****************************************************************************/
|
806 |
|
|
|
807 |
|
|
/* (Driver->RIO,pre-emptive)
|
808 |
|
|
|
809 |
|
|
MBIC is sent pre-emptively from the driver to clear a port's modem signals.
|
810 |
|
|
*/
|
811 |
|
|
#if 0
|
812 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
813 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
814 |
|
|
#endif
|
815 |
|
|
|
816 |
|
|
#define PKT_ModemClear (PKT_Data+4) /* Modem clear signals mask */
|
817 |
|
|
|
818 |
|
|
/* ModemClear definitions... */
|
819 |
|
|
#define MBIC_RTS 0x01 /* RTS modem signal */
|
820 |
|
|
#define MBIC_DTR 0x02 /* DTR modem signal */
|
821 |
|
|
|
822 |
|
|
/*****************************************************************************
|
823 |
|
|
********************************** **********************************
|
824 |
|
|
********************************** MSET **********************************
|
825 |
|
|
********************************** **********************************
|
826 |
|
|
*****************************************************************************/
|
827 |
|
|
|
828 |
|
|
/* (Driver->RIO,pre-emptive)
|
829 |
|
|
|
830 |
|
|
MSET is sent pre-emptively from the driver to set/clear a port's modem signals. */
|
831 |
|
|
#if 0
|
832 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
833 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
834 |
|
|
#endif
|
835 |
|
|
|
836 |
|
|
#define PKT_ModemSet (PKT_Data+4) /* Modem set signals mask */
|
837 |
|
|
|
838 |
|
|
/* ModemSet definitions... */
|
839 |
|
|
#define MSET_RTS 0x01 /* RTS modem signal */
|
840 |
|
|
#define MSET_DTR 0x02 /* DTR modem signal */
|
841 |
|
|
|
842 |
|
|
/*****************************************************************************
|
843 |
|
|
********************************* *********************************
|
844 |
|
|
********************************* PCLOSE *********************************
|
845 |
|
|
********************************* *********************************
|
846 |
|
|
*****************************************************************************/
|
847 |
|
|
|
848 |
|
|
/* (Driver->RIO,in-band)
|
849 |
|
|
|
850 |
|
|
PCLOSE is sent from the driver to pseudo close a previously opened port.
|
851 |
|
|
|
852 |
|
|
The port will close when all data has been sent/received, however, the
|
853 |
|
|
port's transmit / receive and modem signals will be left enabled and the
|
854 |
|
|
port marked internally as Pseudo Closed. */
|
855 |
|
|
|
856 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
857 |
|
|
|
858 |
|
|
/*****************************************************************************
|
859 |
|
|
********************************** **********************************
|
860 |
|
|
********************************** MGET **********************************
|
861 |
|
|
********************************** **********************************
|
862 |
|
|
*****************************************************************************/
|
863 |
|
|
|
864 |
|
|
/* (Driver->RIO,pre-emptive)
|
865 |
|
|
|
866 |
|
|
MGET is sent pre-emptively from the driver to request the port's current modem signals. */
|
867 |
|
|
|
868 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
869 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
870 |
|
|
|
871 |
|
|
/*****************************************************************************
|
872 |
|
|
********************************* ********************************
|
873 |
|
|
********************************* MEMDUMP ********************************
|
874 |
|
|
********************************* ********************************
|
875 |
|
|
*****************************************************************************/
|
876 |
|
|
|
877 |
|
|
/* (Driver->RIO,pre-emptive)
|
878 |
|
|
|
879 |
|
|
MEMDUMP is sent pre-emptively from the driver to request a dump of 32 bytes
|
880 |
|
|
of the specified port's RTA address space.
|
881 |
|
|
*/
|
882 |
|
|
#if 0
|
883 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
884 |
|
|
#endif
|
885 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
886 |
|
|
#define PKT_SubCmd (PKT_Data+5) /* Sub Command */
|
887 |
|
|
#define PKT_Address (PKT_Data+6) /* Requested address */
|
888 |
|
|
|
889 |
|
|
/*****************************************************************************
|
890 |
|
|
****************************** *****************************
|
891 |
|
|
****************************** READ_REGISTER *****************************
|
892 |
|
|
****************************** *****************************
|
893 |
|
|
*****************************************************************************/
|
894 |
|
|
|
895 |
|
|
/* (Driver->RIO,pre-emptive)
|
896 |
|
|
|
897 |
|
|
READ_REGISTER is sent pre-emptively from the driver to request the contents
|
898 |
|
|
of the CD1400 register specified in address.
|
899 |
|
|
*/
|
900 |
|
|
#if 0
|
901 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
902 |
|
|
#endif
|
903 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
904 |
|
|
#define PKT_SubCmd (PKT_Data+5) /* Sub Command */
|
905 |
|
|
#define PKT_Address (PKT_Data+6) /* Requested address */
|
906 |
|
|
|
907 |
|
|
/*****************************************************************************
|
908 |
|
|
************************ **************************
|
909 |
|
|
************************ COMMAND_RUP - COMPLETE **************************
|
910 |
|
|
************************ **************************
|
911 |
|
|
*****************************************************************************/
|
912 |
|
|
|
913 |
|
|
/* (RIO->Driver,pre-emptive)
|
914 |
|
|
|
915 |
|
|
COMMAND_RUP - COMPLETE is sent in response to all port I/O control command
|
916 |
|
|
packets, except MEMDUMP and READ_REGISTER.
|
917 |
|
|
*/
|
918 |
|
|
#if 0
|
919 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
920 |
|
|
#endif
|
921 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
922 |
|
|
#define PKT_Cmd2 (PKT_Data+2) /* Command code copy */
|
923 |
|
|
#define PKT_ModemStatus (PKT_Data+3) /* Modem signal status */
|
924 |
|
|
#define PKT_PortStatus (PKT_Data+4) /* Port signal status */
|
925 |
|
|
#define PKT_SubCmd (PKT_Data+5) /* Sub Command */
|
926 |
|
|
|
927 |
|
|
/* ModemStatus definitions... */
|
928 |
|
|
#define MODEM_DSR 0x80 /* Data Set Ready modem state */
|
929 |
|
|
#define MODEM_CTS 0x40 /* Clear To Send modem state */
|
930 |
|
|
#define MODEM_RI 0x20 /* Ring Indicate modem state */
|
931 |
|
|
#define MODEM_CD 0x10 /* Carrier Detect modem state */
|
932 |
|
|
#define MODEM_TSTOP 0x08 /* Transmit Stopped state */
|
933 |
|
|
#define MODEM_TEMPTY 0x04 /* Transmit Empty state */
|
934 |
|
|
#define MODEM_DTR 0x02 /* DTR modem output state */
|
935 |
|
|
#define MODEM_RTS 0x01 /* RTS modem output state */
|
936 |
|
|
|
937 |
|
|
/* PortStatus definitions... */
|
938 |
|
|
#define PORT_ISOPEN 0x01 /* Port open ? */
|
939 |
|
|
#define PORT_HUPCL 0x02 /* Hangup on close? */
|
940 |
|
|
#define PORT_MOPENPEND 0x04 /* Modem open pending */
|
941 |
|
|
#define PORT_ISPARALLEL 0x08 /* Parallel port */
|
942 |
|
|
#define PORT_BREAK 0x10 /* Port on break */
|
943 |
|
|
#define PORT_STATUSPEND 0020 /* Status packet pending */
|
944 |
|
|
#define PORT_BREAKPEND 0x40 /* Break packet pending */
|
945 |
|
|
#define PORT_MODEMPEND 0x80 /* Modem status packet pending */
|
946 |
|
|
|
947 |
|
|
/*****************************************************************************
|
948 |
|
|
************************ **************************
|
949 |
|
|
************************ COMMAND_RUP - COMPLETE **************************
|
950 |
|
|
************************ **************************
|
951 |
|
|
*****************************************************************************/
|
952 |
|
|
|
953 |
|
|
/* (RIO->Driver,pre-emptive)
|
954 |
|
|
|
955 |
|
|
COMMAND_RUP - COMPLETE is sent in response to all port I/O control command
|
956 |
|
|
packets, except MEMDUMP and READ_REGISTER.
|
957 |
|
|
*/
|
958 |
|
|
#if 0
|
959 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
960 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
961 |
|
|
#define PKT_Cmd2 (PKT_Data+2) /* Command code copy */
|
962 |
|
|
#endif
|
963 |
|
|
#define PKT_ModemStatus (PKT_Data+3) /* Modem signal status */
|
964 |
|
|
#define PKT_PortStatus (PKT_Data+4) /* Port signal status */
|
965 |
|
|
#if 0
|
966 |
|
|
#define PKT_SubCmd (PKT_Data+5) /* Sub Command */
|
967 |
|
|
#endif
|
968 |
|
|
|
969 |
|
|
/* ModemStatus definitions... */
|
970 |
|
|
#define MODEM_DSR 0x80 /* Data Set Ready modem state */
|
971 |
|
|
#define MODEM_CTS 0x40 /* Clear To Send modem state */
|
972 |
|
|
#define MODEM_RI 0x20 /* Ring Indicate modem state */
|
973 |
|
|
#define MODEM_CD 0x10 /* Carrier Detect modem state */
|
974 |
|
|
#define MODEM_TSTOP 0x08 /* Transmit Stopped state */
|
975 |
|
|
#define MODEM_TEMPTY 0x04 /* Transmit Empty state */
|
976 |
|
|
#define MODEM_DTR 0x02 /* DTR modem output state */
|
977 |
|
|
#define MODEM_RTS 0x01 /* RTS modem output state */
|
978 |
|
|
|
979 |
|
|
/* PortStatus definitions... */
|
980 |
|
|
#define PORT_ISOPEN 0x01 /* Port open ? */
|
981 |
|
|
#define PORT_HUPCL 0x02 /* Hangup on close? */
|
982 |
|
|
#define PORT_MOPENPEND 0x04 /* Modem open pending */
|
983 |
|
|
#define PORT_ISPARALLEL 0x08 /* Parallel port */
|
984 |
|
|
#define PORT_BREAK 0x10 /* Port on break */
|
985 |
|
|
#define PORT_STATUSPEND 0020 /* Status packet pending */
|
986 |
|
|
#define PORT_BREAKPEND 0x40 /* Break packet pending */
|
987 |
|
|
#define PORT_MODEMPEND 0x80 /* Modem status packet pending */
|
988 |
|
|
|
989 |
|
|
/*****************************************************************************
|
990 |
|
|
******************** ********************
|
991 |
|
|
******************** COMMAND_RUP - COMPLETE - MEMDUMP ********************
|
992 |
|
|
******************** ********************
|
993 |
|
|
*****************************************************************************/
|
994 |
|
|
|
995 |
|
|
/* (RIO->Driver,pre-emptive)
|
996 |
|
|
|
997 |
|
|
COMMAND_RUP - COMPLETE - MEMDUMP is sent as an acknowledgement for a MEMDUMP
|
998 |
|
|
port I/O control command packet.
|
999 |
|
|
*/
|
1000 |
|
|
#if 0
|
1001 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1002 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
1003 |
|
|
#define PKT_Cmd2 (PKT_Data+2) /* Command code copy */
|
1004 |
|
|
#define PKT_ModemStatus (PKT_Data+3) /* Modem signal status */
|
1005 |
|
|
#define PKT_PortStatus (PKT_Data+4) /* Port signal status */
|
1006 |
|
|
#define PKT_SubCmd (PKT_Data+5) /* Sub Command */
|
1007 |
|
|
#define PKT_Address (PKT_Data+6) /* Requested address */
|
1008 |
|
|
#endif
|
1009 |
|
|
#define PKT_Dump (PKT_Data+8) /* 32bytes of requested dump data */
|
1010 |
|
|
|
1011 |
|
|
/*****************************************************************************
|
1012 |
|
|
***************** *****************
|
1013 |
|
|
***************** COMMAND_RUP - COMPLETE - READ_REGISTER *****************
|
1014 |
|
|
***************** *****************
|
1015 |
|
|
*****************************************************************************/
|
1016 |
|
|
|
1017 |
|
|
/* (RIO->Driver,pre-emptive)
|
1018 |
|
|
|
1019 |
|
|
COMMAND_RUP - COMPLETE - READ_REGISTER is sent as an acknowledgement for a
|
1020 |
|
|
READ_REGISTER port I/O control command packet.
|
1021 |
|
|
*/
|
1022 |
|
|
#if 0
|
1023 |
|
|
#define PKT_Cmd (PKT_Data+0) /*Command code */
|
1024 |
|
|
#define PKT_PhbNum (PKT_Data+1) /*Port number wrt RTA */
|
1025 |
|
|
#define PKT_Cmd2 (PKT_Data+2) /* Command code copy */
|
1026 |
|
|
#endif
|
1027 |
|
|
#define PKT_RegisterValue (PKT_Data+3) /* Modem signal status */
|
1028 |
|
|
#if 0
|
1029 |
|
|
#define PKT_PortStatus (PKT_Data+4) /* Port signal status */
|
1030 |
|
|
#define PKT_SubCmd (PKT_Data+5) /* Sub Command */
|
1031 |
|
|
#endif
|
1032 |
|
|
|
1033 |
|
|
/*****************************************************************************
|
1034 |
|
|
********************* ***********************
|
1035 |
|
|
********************* COMMAND_RUP - BREAK_RECEIVED ***********************
|
1036 |
|
|
********************* ***********************
|
1037 |
|
|
*****************************************************************************/
|
1038 |
|
|
|
1039 |
|
|
/* (RIO->Driver,pre-emptive)
|
1040 |
|
|
|
1041 |
|
|
COMMAND_RUP - BREAK_RECEIVED packets are sent when the port detects a receive BREAK signal.
|
1042 |
|
|
*/
|
1043 |
|
|
#if 0
|
1044 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1045 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
1046 |
|
|
#define PKT_Cmd2 (PKT_Data+2) /* Command code copy */
|
1047 |
|
|
#endif
|
1048 |
|
|
|
1049 |
|
|
/*****************************************************************************
|
1050 |
|
|
********************* *************************
|
1051 |
|
|
********************* COMMAND_RUP - MODEM_STATUS *************************
|
1052 |
|
|
********************* *************************
|
1053 |
|
|
*****************************************************************************/
|
1054 |
|
|
|
1055 |
|
|
/* (RIO->Driver,pre-emptive)
|
1056 |
|
|
|
1057 |
|
|
COMMAND_RUP - MODEM_STATUS packets are sent whenever the port detects a
|
1058 |
|
|
change in the input modem signal states.
|
1059 |
|
|
|
1060 |
|
|
*/
|
1061 |
|
|
#if 0
|
1062 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1063 |
|
|
#define PKT_PhbNum (PKT_Data+1) /* Port number wrt RTA */
|
1064 |
|
|
#define PKT_Cmd2 (PKT_Data+2) /* Command code copy */
|
1065 |
|
|
#define PKT_ModemStatus (PKT_Data+3) /* Modem signal status */
|
1066 |
|
|
#endif
|
1067 |
|
|
|
1068 |
|
|
/*****************************************************************************
|
1069 |
|
|
************************ *************************
|
1070 |
|
|
************************ BOOT_RUP - BOOT_REQUEST *************************
|
1071 |
|
|
************************ *************************
|
1072 |
|
|
*****************************************************************************/
|
1073 |
|
|
|
1074 |
|
|
/* (RIO->Driver,pre-emptive)
|
1075 |
|
|
|
1076 |
|
|
BOOT_RUP - BOOT_REQUEST packets are sent to the Driver from RIO to request
|
1077 |
|
|
firmware code to load onto attached RTAs.
|
1078 |
|
|
*/
|
1079 |
|
|
#if 0
|
1080 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1081 |
|
|
#endif
|
1082 |
|
|
|
1083 |
|
|
/*****************************************************************************
|
1084 |
|
|
************************ ************************
|
1085 |
|
|
************************ BOOT_RUP - BOOT_SEQUENCE ************************
|
1086 |
|
|
************************ ************************
|
1087 |
|
|
*****************************************************************************/
|
1088 |
|
|
|
1089 |
|
|
/* (Driver->RIO,pre-emptive)
|
1090 |
|
|
|
1091 |
|
|
BOOT_RUP - BOOT_SEQUENCE packets are sent from the Driver to RIO in response
|
1092 |
|
|
to a BOOT_RUP - BOOT_REQUEST packet.
|
1093 |
|
|
*/
|
1094 |
|
|
#if 0
|
1095 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1096 |
|
|
#endif
|
1097 |
|
|
#define PKT_NumPackets (PKT_Data+2) /* Packets required to load firmware */
|
1098 |
|
|
#define PKT_LoadBase (PKT_Data+4) /* RTA firmware load address */
|
1099 |
|
|
#define PKT_CodeSize (PKT_Data+6) /* Size of firmware in bytes */
|
1100 |
|
|
#define PKT_CmdString (PKT_Data+8) /* Command string */
|
1101 |
|
|
|
1102 |
|
|
/*****************************************************************************
|
1103 |
|
|
************************ ***********************
|
1104 |
|
|
************************ BOOT_RUP - BOOT_COMPLETED ***********************
|
1105 |
|
|
************************ ***********************
|
1106 |
|
|
*****************************************************************************/
|
1107 |
|
|
|
1108 |
|
|
/* (RIO->Driver,pre-emptive)
|
1109 |
|
|
|
1110 |
|
|
BOOT_RUP - BOOT_COMPLETE is sent to the Driver from RIO when downloading of
|
1111 |
|
|
RTA firmware has completed.
|
1112 |
|
|
*/
|
1113 |
|
|
#if 0
|
1114 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1115 |
|
|
#endif
|
1116 |
|
|
#define PKT_LinkNumber (PKT_Data+1) /* Link number RTA booted on */
|
1117 |
|
|
#define PKT_SerialNumber (PKT_Data+2) /* 4 byte serial number */
|
1118 |
|
|
|
1119 |
|
|
/*****************************************************************************
|
1120 |
|
|
************************ ***********************
|
1121 |
|
|
************************ BOOT_RUP - Packet Request ***********************
|
1122 |
|
|
************************ ***********************
|
1123 |
|
|
*****************************************************************************/
|
1124 |
|
|
|
1125 |
|
|
/* (RIO->Driver,pre-emptive)
|
1126 |
|
|
|
1127 |
|
|
BOOT_RUP packet without the PKT_CMD_BIT set in the PKT->len field is sent
|
1128 |
|
|
from RIO to the Driver as a request for a firmware boot packet. */
|
1129 |
|
|
|
1130 |
|
|
#define PKT_SequenceNumber (PKT_Data+0) /* Packet sequence number */
|
1131 |
|
|
|
1132 |
|
|
/*****************************************************************************
|
1133 |
|
|
*********************** ***********************
|
1134 |
|
|
*********************** BOOT_RUP - Packet Response ***********************
|
1135 |
|
|
*********************** ***********************
|
1136 |
|
|
*****************************************************************************/
|
1137 |
|
|
|
1138 |
|
|
/* (Driver->RIO,pre-emptive)
|
1139 |
|
|
|
1140 |
|
|
In response to a BOOT_RUP boot packet request, the driver fills out the response
|
1141 |
|
|
packet with the 70 bytes of the requested sequence.
|
1142 |
|
|
*/
|
1143 |
|
|
#if 0
|
1144 |
|
|
#define PKT_SequenceNumber (PKT_Data+0) /* Packet sequence number */
|
1145 |
|
|
#endif
|
1146 |
|
|
#define PKT_FirmwarePacket (PKT_Data+2) /* Firmware packet */
|
1147 |
|
|
|
1148 |
|
|
/*****************************************************************************
|
1149 |
|
|
**************************** ****************************
|
1150 |
|
|
**************************** BOOT_RUP - IFOAD ****************************
|
1151 |
|
|
**************************** ****************************
|
1152 |
|
|
*****************************************************************************/
|
1153 |
|
|
|
1154 |
|
|
/* (Driver->RIO,pre-emptive)
|
1155 |
|
|
|
1156 |
|
|
BOOT_RUP - IFOAD packets are sent from the Driver to an RTA to cause the
|
1157 |
|
|
RTA to shut down and reboot.
|
1158 |
|
|
*/
|
1159 |
|
|
#if 0
|
1160 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1161 |
|
|
#endif
|
1162 |
|
|
#define PKT_IfoadId1 (PKT_Data+2) /* IFOAD Id 1 */
|
1163 |
|
|
#define PKT_IfoadId2 (PKT_Data+3) /* IFOAD Id 2 */
|
1164 |
|
|
|
1165 |
|
|
#define IFOADID1 0xAD
|
1166 |
|
|
#define IFOADID2 0xF0
|
1167 |
|
|
|
1168 |
|
|
/*****************************************************************************
|
1169 |
|
|
************************** ***************************
|
1170 |
|
|
************************** BOOT_RUP - IDENTIFY ***************************
|
1171 |
|
|
************************** ***************************
|
1172 |
|
|
*****************************************************************************/
|
1173 |
|
|
|
1174 |
|
|
/* (Driver->RIO,pre-emptive)
|
1175 |
|
|
|
1176 |
|
|
BOOT_RUP - IDENTIFY packets are sent from the Driver to an RTA to cause the
|
1177 |
|
|
RTA to flash its LEDs for a period of time.
|
1178 |
|
|
*/
|
1179 |
|
|
#if 0
|
1180 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1181 |
|
|
#endif
|
1182 |
|
|
#define PKT_IdentifyId (PKT_Data+2) /* defines pattern to flash */
|
1183 |
|
|
|
1184 |
|
|
/*****************************************************************************
|
1185 |
|
|
**************************** ***************************
|
1186 |
|
|
**************************** BOOT_RUP - ZOMBIE ***************************
|
1187 |
|
|
**************************** ***************************
|
1188 |
|
|
*****************************************************************************/
|
1189 |
|
|
|
1190 |
|
|
/* (Driver->RIO,pre-emptive)
|
1191 |
|
|
|
1192 |
|
|
BOOT_RUP - ZOMBIE packets are sent from the Driver to an RTA to cause the
|
1193 |
|
|
RTA to shut down and flash it's LEDs.
|
1194 |
|
|
*/
|
1195 |
|
|
#if 0
|
1196 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1197 |
|
|
#endif
|
1198 |
|
|
#define PKT_ZombieId1 (PKT_Data+2) /* ZOMBIE Id 1 */
|
1199 |
|
|
#define PKT_ZombieId2 (PKT_Data+3) /* ZOMBIE Id 2 */
|
1200 |
|
|
|
1201 |
|
|
#define ZOMBIEID1 0x52
|
1202 |
|
|
#define ZOMBIEID2 0x21
|
1203 |
|
|
|
1204 |
|
|
/*****************************************************************************
|
1205 |
|
|
**************************** ****************************
|
1206 |
|
|
**************************** BOOT_RUP - UFOAD ****************************
|
1207 |
|
|
**************************** ****************************
|
1208 |
|
|
*****************************************************************************/
|
1209 |
|
|
|
1210 |
|
|
/* (Driver->RIO,pre-emptive)
|
1211 |
|
|
|
1212 |
|
|
BOOT_RUP - UFOAD packets are sent from the Driver to an RTA to cause the RTA
|
1213 |
|
|
to ask it's neighbouring RTA to shut down and reboot.
|
1214 |
|
|
*/
|
1215 |
|
|
#if 0
|
1216 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1217 |
|
|
#define PKT_LinkNumber (PKT_Data+1) /* Link number of RTA to UFOAD */
|
1218 |
|
|
#endif
|
1219 |
|
|
#define PKT_UfoadId1 (PKT_Data+2) /* UFOAD Id 1 */
|
1220 |
|
|
#define PKT_UfoadId2 (PKT_Data+3) /* UFOAD Id 2 */
|
1221 |
|
|
|
1222 |
|
|
#define UFOADID1 0x1E
|
1223 |
|
|
#define UFOADID2 0x0D
|
1224 |
|
|
|
1225 |
|
|
/*****************************************************************************
|
1226 |
|
|
**************************** ****************************
|
1227 |
|
|
**************************** BOOT_RUP - IWAIT ****************************
|
1228 |
|
|
**************************** ****************************
|
1229 |
|
|
*****************************************************************************/
|
1230 |
|
|
|
1231 |
|
|
/* (Driver->RIO,pre-emptive)
|
1232 |
|
|
|
1233 |
|
|
BOOT_RUP - IWAIT packets are sent from the Driver to an RTA to cause the RTA
|
1234 |
|
|
to pause booting on the specified link for 30 seconds.
|
1235 |
|
|
*/
|
1236 |
|
|
#if 0
|
1237 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1238 |
|
|
#define PKT_LinkNumber (PKT_Data+1) /* Link number of RTA to UFOAD */
|
1239 |
|
|
#endif
|
1240 |
|
|
#define PKT_IwaitId1 (PKT_Data+2) /* IWAIT Id 1 */
|
1241 |
|
|
#define PKT_IwaitId2 (PKT_Data+3) /* IWAIT Id 2 */
|
1242 |
|
|
|
1243 |
|
|
#define IWAITID1 0xDE
|
1244 |
|
|
#define IWAITID2 0xB1
|
1245 |
|
|
|
1246 |
|
|
/*****************************************************************************
|
1247 |
|
|
************************ ***********************
|
1248 |
|
|
************************ ROUTE_RUP - ROUTE_REQUEST ***********************
|
1249 |
|
|
************************ ***********************
|
1250 |
|
|
*****************************************************************************/
|
1251 |
|
|
|
1252 |
|
|
/* (RIO->Driver,pre-emptive)
|
1253 |
|
|
|
1254 |
|
|
ROUTE_RUP - ROUTE_REQUEST packets are sent from a newly booted or connected
|
1255 |
|
|
RTA to a Driver to request an ID (RUP or unit number).
|
1256 |
|
|
*/
|
1257 |
|
|
#if 0
|
1258 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1259 |
|
|
#endif
|
1260 |
|
|
#define PKT_SerialNumber (PKT_Data+2) /* 4 byte serial number */
|
1261 |
|
|
#define PKT_ModuleTypes (PKT_Data+6) /* RTA Module types */
|
1262 |
|
|
|
1263 |
|
|
/* ModuleTypes definitions... */
|
1264 |
|
|
#define MOD_BLANK 0x0F /* Blank plate attached */
|
1265 |
|
|
#define MOD_RS232DB25 0x00 /* RS232 DB25 connector */
|
1266 |
|
|
#define MOD_RS232RJ45 0x01 /* RS232 RJ45 connector */
|
1267 |
|
|
#define MOD_RS422DB25 0x02 /* RS422 DB25 connector */
|
1268 |
|
|
#define MOD_RS485DB25 0x03 /* RS485 DB25 connector */
|
1269 |
|
|
#define MOD_PARALLEL 0x04 /* Centronics parallel */
|
1270 |
|
|
|
1271 |
|
|
#define MOD2 0x08 /* Set to indicate Rev2 module */
|
1272 |
|
|
|
1273 |
|
|
/*****************************************************************************
|
1274 |
|
|
************************* *************************
|
1275 |
|
|
************************* ROUTE_RUP - ROUTE_FOAD *************************
|
1276 |
|
|
************************* *************************
|
1277 |
|
|
*****************************************************************************/
|
1278 |
|
|
|
1279 |
|
|
/* (Driver->RIO,pre-emptive)
|
1280 |
|
|
|
1281 |
|
|
ROUTE_RUP - ROUTE_FOAD packet is sent as a response to a ROUTE_RUP - ROUTE_REQUEST
|
1282 |
|
|
packet to cause the RTA to "Fall Over And Die"., i.e. shutdown and reboot.
|
1283 |
|
|
*/
|
1284 |
|
|
#if 0
|
1285 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1286 |
|
|
#endif
|
1287 |
|
|
#define PKT_RouteCmdString (PKT_Data+2) /* Command string */
|
1288 |
|
|
|
1289 |
|
|
/*****************************************************************************
|
1290 |
|
|
*********************** ***********************
|
1291 |
|
|
*********************** ROUTE_RUP - ROUTE_ALLOCATE ***********************
|
1292 |
|
|
*********************** ***********************
|
1293 |
|
|
*****************************************************************************/
|
1294 |
|
|
|
1295 |
|
|
/* (Driver->RIO,pre-emptive)
|
1296 |
|
|
|
1297 |
|
|
ROUTE_RUP - ROUTE_ALLOCATE packet is sent as a response to a ROUTE_RUP - ROUTE_REQUEST
|
1298 |
|
|
packet to allocate the RTA's Id number (RUP number 1..16)
|
1299 |
|
|
*/
|
1300 |
|
|
#if 0
|
1301 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1302 |
|
|
#endif
|
1303 |
|
|
#define PKT_IdNum (PKT_Data+1) /* RUP number for ports 1..8 */
|
1304 |
|
|
#if 0
|
1305 |
|
|
#define PKT_RouteCmdString (PKT_Data+2) /* Command string */
|
1306 |
|
|
#endif
|
1307 |
|
|
#define PKT_IdNum2 (PKT_Data+0x17) /* RUP number for ports 9..16 */
|
1308 |
|
|
|
1309 |
|
|
/*****************************************************************************
|
1310 |
|
|
*********************** ***********************
|
1311 |
|
|
*********************** ROUTE_RUP - ROUTE_TOPOLOGY ***********************
|
1312 |
|
|
*********************** ***********************
|
1313 |
|
|
*****************************************************************************/
|
1314 |
|
|
|
1315 |
|
|
/* (RIO->Driver,pre-emptive)
|
1316 |
|
|
|
1317 |
|
|
ROUTE_RUP - ROUTE_TOPOLOGY packet is sent to inform the driver of an RTA's
|
1318 |
|
|
current link status.
|
1319 |
|
|
*/
|
1320 |
|
|
#if 0
|
1321 |
|
|
#define PKT_Cmd (PKT_Data+0) /* Command code */
|
1322 |
|
|
#endif
|
1323 |
|
|
#define PKT_Link1Rup (PKT_Data+2) /* Link 1 RUP number */
|
1324 |
|
|
#define PKT_Link1Link (PKT_Data+3) /* Link 1 link number */
|
1325 |
|
|
#define PKT_Link2Rup (PKT_Data+4) /* Link 2 RUP number */
|
1326 |
|
|
#define PKT_Link2Link (PKT_Data+5) /* Link 2 link number */
|
1327 |
|
|
#define PKT_Link3Rup (PKT_Data+6) /* Link 3 RUP number */
|
1328 |
|
|
#define PKT_Link3Link (PKT_Data+7) /* Link 3 link number */
|
1329 |
|
|
#define PKT_Link4Rup (PKT_Data+8) /* Link 4 RUP number */
|
1330 |
|
|
#define PKT_Link4Link (PKT_Data+9) /* Link 4 link number */
|
1331 |
|
|
#define PKT_RtaVpdProm (PKT_Data+10) /* 32 bytes of RTA VPD PROM Contents */
|
1332 |
|
|
|
1333 |
|
|
#endif /* _sxwinif_h */
|
1334 |
|
|
|
1335 |
|
|
/* End of RIOWINIF.H */
|