Skip to content

Commit 0b7a43d

Browse files
atorguedavem330
authored andcommitted
Documentation: networking: update stmmac
Update stmmac driver documentation according to new GMAC 4.x family. Signed-off-by: Alexandre TORGUE <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f748be5 commit 0b7a43d

File tree

1 file changed

+38
-6
lines changed

1 file changed

+38
-6
lines changed

Documentation/networking/stmmac.txt

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
STMicroelectronics 10/100/1000 Synopsys Ethernet driver
22

3-
Copyright (C) 2007-2014 STMicroelectronics Ltd
3+
Copyright (C) 2007-2015 STMicroelectronics Ltd
44
Author: Giuseppe Cavallaro <[email protected]>
55

66
This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers
@@ -138,6 +138,8 @@ struct plat_stmmacenet_data {
138138
int (*init)(struct platform_device *pdev, void *priv);
139139
void (*exit)(struct platform_device *pdev, void *priv);
140140
void *bsp_priv;
141+
int has_gmac4;
142+
bool tso_en;
141143
};
142144

143145
Where:
@@ -181,6 +183,8 @@ Where:
181183
registers. init/exit callbacks should not use or modify
182184
platform data.
183185
o bsp_priv: another private pointer.
186+
o has_gmac4: uses GMAC4 core.
187+
o tso_en: Enables TSO (TCP Segmentation Offload) feature.
184188

185189
For MDIO bus The we have:
186190

@@ -278,6 +282,13 @@ Please see the following document:
278282
o stmmac_ethtool.c: to implement the ethtool support;
279283
o stmmac.h: private driver structure;
280284
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
281292
o descs.h: descriptor structure definitions;
282293
o dwmac1000_core.c: dwmac GiGa core functions;
283294
o dwmac1000_dma.c: dma functions for the GMAC chip;
@@ -289,11 +300,32 @@ Please see the following document:
289300
o enh_desc.c: functions for handling enhanced descriptors;
290301
o norm_desc.c: functions for handling normal descriptors;
291302
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.
297329

298330
5) Debug Information
299331

0 commit comments

Comments
 (0)