diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/char/rio/pkt.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'drivers/char/rio/pkt.h')
-rw-r--r-- | drivers/char/rio/pkt.h | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/drivers/char/rio/pkt.h b/drivers/char/rio/pkt.h new file mode 100644 index 000000000000..66bb2ff0f694 --- /dev/null +++ b/drivers/char/rio/pkt.h | |||
@@ -0,0 +1,120 @@ | |||
1 | /**************************************************************************** | ||
2 | ******* ******* | ||
3 | ******* P A C K E T H E A D E R F I L E | ||
4 | ******* ******* | ||
5 | **************************************************************************** | ||
6 | |||
7 | Author : Ian Nandhra / Jeremy Rolls | ||
8 | Date : | ||
9 | |||
10 | * | ||
11 | * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License as published by | ||
15 | * the Free Software Foundation; either version 2 of the License, or | ||
16 | * (at your option) any later version. | ||
17 | * | ||
18 | * This program is distributed in the hope that it will be useful, | ||
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
21 | * GNU General Public License for more details. | ||
22 | * | ||
23 | * You should have received a copy of the GNU General Public License | ||
24 | * along with this program; if not, write to the Free Software | ||
25 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
26 | |||
27 | Version : 0.01 | ||
28 | |||
29 | |||
30 | Mods | ||
31 | ---------------------------------------------------------------------------- | ||
32 | Date By Description | ||
33 | ---------------------------------------------------------------------------- | ||
34 | |||
35 | ***************************************************************************/ | ||
36 | |||
37 | #ifndef _pkt_h | ||
38 | #define _pkt_h 1 | ||
39 | |||
40 | |||
41 | #ifdef SCCS_LABELS | ||
42 | #ifndef lint | ||
43 | /* static char *_rio_pkt_h_sccs = "@(#)pkt.h 1.8"; */ | ||
44 | #endif | ||
45 | #endif | ||
46 | |||
47 | #define MAX_TTL 0xf | ||
48 | #define PKT_CMD_BIT ((ushort) 0x080) | ||
49 | #define PKT_CMD_DATA ((ushort) 0x080) | ||
50 | |||
51 | #define PKT_ACK ((ushort) 0x040) | ||
52 | |||
53 | #define PKT_TGL ((ushort) 0x020) | ||
54 | |||
55 | #define PKT_LEN_MASK ((ushort) 0x07f) | ||
56 | |||
57 | #define DATA_WNDW ((ushort) 0x10) | ||
58 | #define PKT_TTL_MASK ((ushort) 0x0f) | ||
59 | |||
60 | #define PKT_MAX_DATA_LEN 72 | ||
61 | |||
62 | #define PKT_LENGTH sizeof(struct PKT) | ||
63 | #define SYNC_PKT_LENGTH (PKT_LENGTH + 4) | ||
64 | |||
65 | #define CONTROL_PKT_LEN_MASK PKT_LEN_MASK | ||
66 | #define CONTROL_PKT_CMD_BIT PKT_CMD_BIT | ||
67 | #define CONTROL_PKT_ACK (PKT_ACK << 8) | ||
68 | #define CONTROL_PKT_TGL (PKT_TGL << 8) | ||
69 | #define CONTROL_PKT_TTL_MASK (PKT_TTL_MASK << 8) | ||
70 | #define CONTROL_DATA_WNDW (DATA_WNDW << 8) | ||
71 | |||
72 | struct PKT { | ||
73 | #ifdef INKERNEL | ||
74 | BYTE dest_unit ; /* Destination Unit Id */ | ||
75 | BYTE dest_port ; /* Destination POrt */ | ||
76 | BYTE src_unit ; /* Source Unit Id */ | ||
77 | BYTE src_port ; /* Source POrt */ | ||
78 | #else | ||
79 | union | ||
80 | { | ||
81 | ushort destination; /* Complete destination */ | ||
82 | struct | ||
83 | { | ||
84 | unsigned char unit; /* Destination unit */ | ||
85 | unsigned char port; /* Destination port */ | ||
86 | } s1; | ||
87 | } u1; | ||
88 | union | ||
89 | { | ||
90 | ushort source; /* Complete source */ | ||
91 | struct | ||
92 | { | ||
93 | unsigned char unit; /* Source unit */ | ||
94 | unsigned char port; /* Source port */ | ||
95 | } s2; | ||
96 | } u2; | ||
97 | #endif | ||
98 | #ifdef INKERNEL | ||
99 | BYTE len ; | ||
100 | BYTE control; | ||
101 | #else | ||
102 | union | ||
103 | { | ||
104 | ushort control; | ||
105 | struct | ||
106 | { | ||
107 | unsigned char len; | ||
108 | unsigned char control; | ||
109 | } s3; | ||
110 | } u3; | ||
111 | #endif | ||
112 | BYTE data[PKT_MAX_DATA_LEN] ; | ||
113 | /* Actual data :-) */ | ||
114 | WORD csum ; /* C-SUM */ | ||
115 | } ; | ||
116 | #endif | ||
117 | |||
118 | /*********** end of file ***********/ | ||
119 | |||
120 | |||