]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/staging/benet/host_struct.h
thermal: support forcing support for passive cooling
[linux-2.6-omap-h63xx.git] / drivers / staging / benet / host_struct.h
1 /*
2  * Copyright (C) 2005 - 2008 ServerEngines
3  * All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License version 2
7  * as published by the Free Software Foundation.  The full GNU General
8  * Public License is included in this distribution in the file called COPYING.
9  *
10  * Contact Information:
11  * linux-drivers@serverengines.com
12  *
13  * ServerEngines
14  * 209 N. Fair Oaks Ave
15  * Sunnyvale, CA 94085
16  */
17 /*
18  * Autogenerated by srcgen version: 0127
19  */
20 #ifndef __host_struct_amap_h__
21 #define __host_struct_amap_h__
22 #include "be_cm.h"
23 #include "be_common.h"
24 #include "descriptors.h"
25
26 /* --- EQ_COMPLETION_MAJOR_CODE_ENUM --- */
27 #define EQ_MAJOR_CODE_COMPLETION        (0)     /* Completion event on a */
28                                                   /* qcompletion ueue. */
29 #define EQ_MAJOR_CODE_ETH               (1)     /* Affiliated Ethernet Event. */
30 #define EQ_MAJOR_CODE_RESERVED          (2)     /* Reserved */
31 #define EQ_MAJOR_CODE_RDMA              (3)     /* Affiliated RDMA Event. */
32 #define EQ_MAJOR_CODE_ISCSI             (4)     /* Affiliated ISCSI Event */
33 #define EQ_MAJOR_CODE_UNAFFILIATED      (5)     /* Unaffiliated Event */
34
35 /* --- EQ_COMPLETION_MINOR_CODE_ENUM --- */
36 #define EQ_MINOR_CODE_COMPLETION        (0)     /* Completion event on a */
37                                                   /* completion queue. */
38 #define EQ_MINOR_CODE_OTHER             (1)     /* Other Event (TBD). */
39
40 /* Queue Entry Definition for all 4 byte event queue types. */
41 struct BE_EQ_ENTRY_AMAP {
42         u8 Valid;               /* DWORD 0 */
43         u8 MajorCode[3];        /* DWORD 0 */
44         u8 MinorCode[12];       /* DWORD 0 */
45         u8 ResourceID[16];      /* DWORD 0 */
46 } __packed;
47 struct EQ_ENTRY_AMAP {
48         u32 dw[1];
49 };
50
51 /*
52  * --- ETH_EVENT_CODE ---
53  * These codes are returned by the MPU when one of these events has occurred,
54  * and the event is configured to report to an Event Queue when an event
55  * is detected.
56  */
57 #define ETH_EQ_LINK_STATUS              (0)     /* Link status change event */
58                                                   /* detected. */
59 #define ETH_EQ_WATERMARK                (1)     /* watermark event detected. */
60 #define ETH_EQ_MAGIC_PKT                (2)     /* magic pkt event detected. */
61 #define ETH_EQ_ACPI_PKT0                (3)     /* ACPI interesting packet */
62                                                   /* detected. */
63 #define ETH_EQ_ACPI_PKT1                (3)     /* ACPI interesting packet */
64                                                   /* detected. */
65 #define ETH_EQ_ACPI_PKT2                (3)     /* ACPI interesting packet */
66                                                   /* detected. */
67 #define ETH_EQ_ACPI_PKT3                (3)     /* ACPI interesting packet */
68                                                   /* detected. */
69
70 /*
71  * --- ETH_TX_COMPL_STATUS_ENUM ---
72  * Status codes contained in Ethernet TX completion descriptors.
73  */
74 #define ETH_COMP_VALID                  (0)
75 #define ETH_COMP_ERROR                  (1)
76 #define ETH_COMP_INVALID                (15)
77
78 /*
79  * --- ETH_TX_COMPL_PORT_ENUM ---
80  * Port indicator contained in Ethernet TX completion descriptors.
81  */
82 #define ETH_COMP_PORT0                  (0)
83 #define ETH_COMP_PORT1                  (1)
84 #define ETH_COMP_MGMT                   (2)
85
86 /*
87  * --- ETH_TX_COMPL_CT_ENUM ---
88  * Completion type indicator contained in Ethernet TX completion descriptors.
89  */
90 #define ETH_COMP_ETH                    (0)
91
92 /*
93  * Work request block that the driver issues to the chip for
94  * Ethernet transmissions. All control fields must be valid in each WRB for
95  * a message. The controller, as specified by the flags, optionally writes
96  * an entry to the Completion Ring and generate an event.
97  */
98 struct BE_ETH_WRB_AMAP {
99         u8 frag_pa_hi[32];      /* DWORD 0 */
100         u8 frag_pa_lo[32];      /* DWORD 1 */
101         u8 complete;    /* DWORD 2 */
102         u8 event;               /* DWORD 2 */
103         u8 crc;         /* DWORD 2 */
104         u8 forward;             /* DWORD 2 */
105         u8 ipsec;               /* DWORD 2 */
106         u8 mgmt;                /* DWORD 2 */
107         u8 ipcs;                /* DWORD 2 */
108         u8 udpcs;               /* DWORD 2 */
109         u8 tcpcs;               /* DWORD 2 */
110         u8 lso;         /* DWORD 2 */
111         u8 last;                /* DWORD 2 */
112         u8 vlan;                /* DWORD 2 */
113         u8 dbg[3];              /* DWORD 2 */
114         u8 hash_val[3]; /* DWORD 2 */
115         u8 lso_mss[14]; /* DWORD 2 */
116         u8 frag_len[16];        /* DWORD 3 */
117         u8 vlan_tag[16];        /* DWORD 3 */
118 } __packed;
119 struct ETH_WRB_AMAP {
120         u32 dw[4];
121 };
122
123 /* This is an Ethernet transmit completion descriptor */
124 struct BE_ETH_TX_COMPL_AMAP {
125         u8 user_bytes[16];      /* DWORD 0 */
126         u8 nwh_bytes[8];        /* DWORD 0 */
127         u8 lso;         /* DWORD 0 */
128         u8 rsvd0[7];    /* DWORD 0 */
129         u8 wrb_index[16];       /* DWORD 1 */
130         u8 ct[2];               /* DWORD 1 */
131         u8 port[2];             /* DWORD 1 */
132         u8 rsvd1[8];    /* DWORD 1 */
133         u8 status[4];   /* DWORD 1 */
134         u8 rsvd2[16];   /* DWORD 2 */
135         u8 ringid[11];  /* DWORD 2 */
136         u8 hash_val[4]; /* DWORD 2 */
137         u8 valid;               /* DWORD 2 */
138         u8 rsvd3[32];   /* DWORD 3 */
139 } __packed;
140 struct ETH_TX_COMPL_AMAP {
141         u32 dw[4];
142 };
143
144 /* Ethernet Receive Buffer descriptor */
145 struct BE_ETH_RX_D_AMAP {
146         u8 fragpa_hi[32];       /* DWORD 0 */
147         u8 fragpa_lo[32];       /* DWORD 1 */
148 } __packed;
149 struct ETH_RX_D_AMAP {
150         u32 dw[2];
151 };
152
153 /* This is an Ethernet Receive Completion Descriptor */
154 struct BE_ETH_RX_COMPL_AMAP {
155         u8 vlan_tag[16];        /* DWORD 0 */
156         u8 pktsize[14]; /* DWORD 0 */
157         u8 port;                /* DWORD 0 */
158         u8 rsvd0;               /* DWORD 0 */
159         u8 err;         /* DWORD 1 */
160         u8 rsshp;               /* DWORD 1 */
161         u8 ipf;         /* DWORD 1 */
162         u8 tcpf;                /* DWORD 1 */
163         u8 udpf;                /* DWORD 1 */
164         u8 ipcksm;              /* DWORD 1 */
165         u8 tcpcksm;             /* DWORD 1 */
166         u8 udpcksm;             /* DWORD 1 */
167         u8 macdst[6];   /* DWORD 1 */
168         u8 vtp;         /* DWORD 1 */
169         u8 vtm;         /* DWORD 1 */
170         u8 fragndx[10]; /* DWORD 1 */
171         u8 ct[2];               /* DWORD 1 */
172         u8 ipsec;               /* DWORD 1 */
173         u8 numfrags[3]; /* DWORD 1 */
174         u8 rsvd1[31];   /* DWORD 2 */
175         u8 valid;               /* DWORD 2 */
176         u8 rsshash[32]; /* DWORD 3 */
177 } __packed;
178 struct ETH_RX_COMPL_AMAP {
179         u32 dw[4];
180 };
181
182 #endif /* __host_struct_amap_h__ */