1
1
STMicroelectronics 10/100/1000 Synopsys Ethernet driver
2
2
3
- Copyright (C) 2007-2014 STMicroelectronics Ltd
3
+ Copyright (C) 2007-2015 STMicroelectronics Ltd
4
4
Author: Giuseppe Cavallaro <
[email protected] >
5
5
6
6
This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers
@@ -138,6 +138,8 @@ struct plat_stmmacenet_data {
138
138
int (*init)(struct platform_device *pdev, void *priv);
139
139
void (*exit)(struct platform_device *pdev, void *priv);
140
140
void *bsp_priv;
141
+ int has_gmac4;
142
+ bool tso_en;
141
143
};
142
144
143
145
Where:
@@ -181,6 +183,8 @@ Where:
181
183
registers. init/exit callbacks should not use or modify
182
184
platform data.
183
185
o bsp_priv: another private pointer.
186
+ o has_gmac4: uses GMAC4 core.
187
+ o tso_en: Enables TSO (TCP Segmentation Offload) feature.
184
188
185
189
For MDIO bus The we have:
186
190
@@ -278,6 +282,13 @@ Please see the following document:
278
282
o stmmac_ethtool.c: to implement the ethtool support;
279
283
o stmmac.h: private driver structure;
280
284
o common.h: common definitions and VFTs;
285
+ o mmc_core.c/mmc.h: Management MAC Counters;
286
+ o stmmac_hwtstamp.c: HW timestamp support for PTP;
287
+ o stmmac_ptp.c: PTP 1588 clock;
288
+ o dwmac-<XXX>.c: these are for the platform glue-logic file; e.g. dwmac-sti.c
289
+ for STMicroelectronics SoCs.
290
+
291
+ - GMAC 3.x
281
292
o descs.h: descriptor structure definitions;
282
293
o dwmac1000_core.c: dwmac GiGa core functions;
283
294
o dwmac1000_dma.c: dma functions for the GMAC chip;
@@ -289,11 +300,32 @@ Please see the following document:
289
300
o enh_desc.c: functions for handling enhanced descriptors;
290
301
o norm_desc.c: functions for handling normal descriptors;
291
302
o chain_mode.c/ring_mode.c:: functions to manage RING/CHAINED modes;
292
- o mmc_core.c/mmc.h: Management MAC Counters;
293
- o stmmac_hwtstamp.c: HW timestamp support for PTP;
294
- o stmmac_ptp.c: PTP 1588 clock;
295
- o dwmac-<XXX>.c: these are for the platform glue-logic file; e.g. dwmac-sti.c
296
- for STMicroelectronics SoCs.
303
+
304
+ - GMAC4.x generation
305
+ o dwmac4_core.c: dwmac GMAC4.x core functions;
306
+ o dwmac4_desc.c: functions for handling GMAC4.x descriptors;
307
+ o dwmac4_descs.h: descriptor definitions;
308
+ o dwmac4_dma.c: dma functions for the GMAC4.x chip;
309
+ o dwmac4_dma.h: dma definitions for the GMAC4.x chip;
310
+ o dwmac4.h: core definitions for the GMAC4.x chip;
311
+ o dwmac4_lib.c: generic GMAC4.x functions;
312
+
313
+ 4.12) TSO support (GMAC4.x)
314
+
315
+ TSO (Tcp Segmentation Offload) feature is supported by GMAC 4.x chip family.
316
+ When a packet is sent through TCP protocol, the TCP stack ensures that
317
+ the SKB provided to the low level driver (stmmac in our case) matches with
318
+ the maximum frame len (IP header + TCP header + payload <= 1500 bytes (for
319
+ MTU set to 1500)). It means that if an application using TCP want to send a
320
+ packet which will have a length (after adding headers) > 1514 the packet
321
+ will be split in several TCP packets: The data payload is split and headers
322
+ (TCP/IP ..) are added. It is done by software.
323
+
324
+ When TSO is enabled, the TCP stack doesn't care about the maximum frame
325
+ length and provide SKB packet to stmmac as it is. The GMAC IP will have to
326
+ perform the segmentation by it self to match with maximum frame length.
327
+
328
+ This feature can be enabled in device tree through "snps,tso" entry.
297
329
298
330
5) Debug Information
299
331
0 commit comments