Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
descs.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Header File to describe the DMA descriptors.
3  Enhanced descriptors have been in case of DWMAC1000 Cores.
4 
5  This program is free software; you can redistribute it and/or modify it
6  under the terms and conditions of the GNU General Public License,
7  version 2, as published by the Free Software Foundation.
8 
9  This program is distributed in the hope it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  more details.
13 
14  You should have received a copy of the GNU General Public License along with
15  this program; if not, write to the Free Software Foundation, Inc.,
16  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
17 
18  The full GNU General Public License is included in this distribution in
19  the file called "COPYING".
20 
21  Author: Giuseppe Cavallaro <[email protected]>
22 *******************************************************************************/
23 
24 #ifndef __DESCS_H__
25 #define __DESCS_H__
26 
27 struct dma_desc {
28  /* Receive descriptor */
29  union {
30  struct {
31  /* RDES0 */
50  u32 own:1;
51  /* RDES1 */
59 
60  } rx;
61  struct {
62  /* RDES0 */
64  u32 crc_error:1;
65  u32 dribbling:1;
68  u32 frame_type:1;
73  u32 vlan_tag:1;
75  u32 length_error:1;
79  u32 frame_length:14;
81  u32 own:1;
82  /* RDES1 */
83  u32 buffer1_size:13;
84  u32 reserved1:1;
86  u32 end_ring:1;
87  u32 buffer2_size:13;
88  u32 reserved2:2;
89  u32 disable_ic:1;
90  } erx; /* -- enhanced -- */
91 
92  /* Transmit descriptor */
93  struct {
94  /* TDES0 */
107  u32 error_summary:1;
110  u32 reserved1:13;
111  u32 own:1;
112  /* TDES1 */
113  u32 buffer1_size:11;
114  u32 buffer2_size:11;
118  u32 end_ring:1;
124  } tx;
125  struct {
126  /* TDES0 */
127  u32 deferred:1;
131  u32 vlan_frame:1;
134  u32 no_carrier:1;
135  u32 loss_carrier:1;
136  u32 payload_error:1;
137  u32 frame_flushed:1;
139  u32 error_summary:1;
142  u32 reserved1:2;
144  u32 end_ring:1;
146  u32 reserved2:1;
149  u32 crc_disable:1;
150  u32 first_segment:1;
151  u32 last_segment:1;
152  u32 interrupt:1;
153  u32 own:1;
154  /* TDES1 */
155  u32 buffer1_size:13;
157  u32 buffer2_size:13;
159  } etx; /* -- enhanced -- */
160  } des01;
161  unsigned int des2;
162  unsigned int des3;
163 };
164 
165 /* Transmit checksum insertion control */
167  cic_disabled = 0, /* Checksum Insertion Control */
168  cic_only_ip = 1, /* Only IP header */
169  cic_no_pseudoheader = 2, /* IP header but pseudoheader
170  * is not calculated */
171  cic_full = 3, /* IP header and pseudoheader */
172 };
173 
174 #endif /* __DESCS_H__ */