2 ** -----------------------------------------------------------------------------
4 ** Perle Specialix driver for Linux
5 ** Ported from existing RIO Driver for SCO sources.
7 * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 ** Last Modified : 11/6/98 11:34:09
26 ** Retrieved : 11/6/98 11:34:20
28 ** ident @(#)cmdpkt.h 1.2
30 ** -----------------------------------------------------------------------------
32 #ifndef __rio_cmdpkt_h__
33 #define __rio_cmdpkt_h__
37 static char *_cmdpkt_h_sccs_
= "@(#)cmdpkt.h 1.2";
42 ** overlays for the data area of a packet. Used in both directions
43 ** (to build a packet to send, and to interpret a packet that arrives)
44 ** and is very inconvenient for MIPS, so they appear as two separate
45 ** structures - those used for modifying/reading packets on the card
46 ** and those for modifying/reading packets in real memory, which have an _M
50 #define RTA_BOOT_DATA_SIZE (PKT_MAX_DATA_LEN-2)
53 ** The boot information packet looks like this:
54 ** This structure overlays a PktCmd->CmdData structure, and so starts
55 ** at Data[2] in the actual pkt!
63 #define BOOT_SEQUENCE_LEN 8
84 struct BootSequence PcBootSequence
;
88 BYTE PcBootData
[RTA_BOOT_DATA_SIZE
];
92 BYTE PcUniqNum
[4]; /* this is really a uint. */
93 BYTE PcModuleTypes
; /* what modules are fitted */
100 BYTE PcSubCommand
; /* commands like mem or register dump */
101 WORD PcSubAddr
; /* Address for command */
102 BYTE PcSubData
[64]; /* Date area for command */
105 struct CmdHdr CmdHdr
;
106 BYTE PcCommandText
[1];
108 BYTE PcIDNum2
; /* It had to go somewhere! */
111 struct CmdHdr CmdHdr
;
112 struct SamTop Topology
[LINKS_PER_UNIT
];
136 uchar PcBootData
[RTA_BOOT_DATA_SIZE
];
140 uchar PcUniqNum
[4]; /* this is really a uint. */
141 uchar PcModuleTypes
; /* what modules are fitted */
154 uchar PcCommandText
[1];
156 uchar PcIDNum2
; /* Tacked on end */
160 struct Top Topology
[LINKS_PER_UNIT
];
165 #define Command U1.S1.CmdHdr.PcCommand
166 #define PhbNum U1.S1.CmdHdr.U0.PcPhbNum
167 #define IDNum U1.S1.CmdHdr.U0.PcIDNum
168 #define IDNum2 U1.S5.PcIDNum2
169 #define LinkNum U1.S1.CmdHdr.U0.PcLinkNum
170 #define Sequence U1.S2.PcSequence
171 #define BootData U1.S2.PcBootData
172 #define BootSequence U1.S1.PcBootSequence
173 #define UniqNum U1.S3.PcUniqNum
174 #define ModemStatus U1.S4.PcModemStatus
175 #define PortStatus U1.S4.PcPortStatus
176 #define SubCommand U1.S4.PcSubCommand
177 #define SubAddr U1.S4.PcSubAddr
178 #define SubData U1.S4.PcSubData
179 #define CommandText U1.S5.PcCommandText
180 #define RouteTopology U1.S6.Topology
181 #define ModuleTypes U1.S3.PcModuleTypes