forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/net/ethernet/stmicro/stmmac/descs.h
....@@ -1,18 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*******************************************************************************
23 Header File to describe the DMA descriptors and related definitions.
34 This is for DWMAC100 and 1000 cores.
45
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
- The full GNU General Public License is included in this distribution in
15
- the file called "COPYING".
166
177 Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
188 *******************************************************************************/
....@@ -133,7 +123,7 @@
133123 #define ETDES1_BUFFER2_SIZE_SHIFT 16
134124
135125 /* Extended Receive descriptor definitions */
136
-#define ERDES4_IP_PAYLOAD_TYPE_MASK GENMASK(2, 6)
126
+#define ERDES4_IP_PAYLOAD_TYPE_MASK GENMASK(6, 2)
137127 #define ERDES4_IP_HDR_ERR BIT(3)
138128 #define ERDES4_IP_PAYLOAD_ERR BIT(4)
139129 #define ERDES4_IP_CSUM_BYPASSED BIT(5)
....@@ -181,6 +171,15 @@
181171 __le32 des7; /* Tx/Rx Timestamp High */
182172 };
183173
174
+/* Enhanced descriptor for TBS */
175
+struct dma_edesc {
176
+ __le32 des4;
177
+ __le32 des5;
178
+ __le32 des6;
179
+ __le32 des7;
180
+ struct dma_desc basic;
181
+};
182
+
184183 /* Transmit checksum insertion control */
185184 #define TX_CIC_FULL 3 /* Include IP header and pseudoheader */
186185