linux_dsm_epyc7002/drivers/net/ethernet/stmicro/stmmac
Niklas Cassel 1e88f6e01b net: stmmac: make dwmac4_release_tx_desc() clear all descriptor fields
Make dwmac4_release_tx_desc() clear all descriptor fields, not just
TDES2 and TDES3.

I'm suspecting that TDES0 and TDES1 wasn't cleared because the DMA
engine uses them to store the tx hardware timestamp (if PTP is enabled).

However, stmmac_tx_clean() calls stmmac_get_tx_hwtstamp(), which reads
and saves the timestamp, before it calls release_tx_desc(), so this
is not an issue.

stmmac_xmit() and stmmac_tso_xmit() both always overwrite TDES0,
however, stmmac_tso_xmit() sometimes sets TDES1, and since neither
stmmac_xmit() nor stmmac_tso_xmit() explicitly clears TDES1, both
functions might reuse a DMA descriptor with old TDES1 data.

I haven't observed any misbehavior even though TDES1 sometimes
point to an old skb, however, explicitly clearing both TDES0 and TDES1
in dwmac4_release_tx_desc() minimizes the chances of undefined behavior.

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27 14:28:10 -05:00
..
altr_tse_pcs.c net: ethernet: stmmac: Convert timers to use timer_setup() 2017-10-18 12:39:37 +01:00
altr_tse_pcs.h
chain_mode.c
common.h net: stmmac: Fix reception of Broadcom switches tags 2018-01-22 16:12:11 -05:00
descs_com.h
descs.h
dwmac4_core.c net: stmmac: rename dwmac4_tx_queue_routing() to match reality 2018-02-20 14:13:19 -05:00
dwmac4_descs.c net: stmmac: make dwmac4_release_tx_desc() clear all descriptor fields 2018-02-27 14:28:10 -05:00
dwmac4_descs.h
dwmac4_dma.c net: stmmac: Disable flow ctrl for RX AVB queues and really enable TX AVB queues 2017-10-14 11:12:08 -07:00
dwmac4_dma.h
dwmac4_lib.c
dwmac4.h net: stmmac: rename GMAC_INT_DEFAULT_MASK for dwmac4 2018-02-09 14:23:04 -05:00
dwmac100_core.c net: stmmac: Fix reception of Broadcom switches tags 2018-01-22 16:12:11 -05:00
dwmac100_dma.c
dwmac100.h
dwmac1000_core.c net: stmmac: remove redundant enable of PMT irq 2018-02-09 14:23:04 -05:00
dwmac1000_dma.c
dwmac1000.h
dwmac_dma.h
dwmac_lib.c net: stmmac: dwmac_lib: fix interchanged sleep/timeout values in DMA reset function 2017-10-13 10:19:52 -07:00
dwmac-anarion.c
dwmac-dwc-qos-eth.c net: stmmac: dwc-qos-eth: Fix typo in DT bindings parsing 2017-10-27 23:23:19 +09:00
dwmac-generic.c
dwmac-ipq806x.c net: ethernet: stmmac: Clean up dead code 2017-10-08 21:19:07 -07:00
dwmac-lpc18xx.c
dwmac-meson8b.c net: stmmac: dwmac-meson8b: make the clock configurations private 2018-02-19 11:26:31 -05:00
dwmac-meson.c
dwmac-oxnas.c
dwmac-rk.c
dwmac-socfpga.c
dwmac-sti.c
dwmac-stm32.c ethernet: dwmac-stm32: Fix copyright 2017-11-29 10:08:09 -05:00
dwmac-sun8i.c net: stmmac: Fix reception of Broadcom switches tags 2018-01-22 16:12:11 -05:00
dwmac-sunxi.c
enh_desc.c net: stmmac: do not use a bitwise AND operator with a bool operand 2018-01-24 16:28:07 -05:00
Kconfig net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs 2017-10-27 11:58:49 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmc_core.c
mmc.h
norm_desc.c net: stmmac: Pad ring number with zeroes in display_ring() 2018-01-02 21:54:56 -05:00
ring_mode.c
stmmac_ethtool.c
stmmac_hwtstamp.c net: stmmac: Fix TX timestamp calculation 2017-12-19 14:12:14 -05:00
stmmac_main.c net: stmmac: ensure that the device has released ownership before reading data 2018-02-27 14:28:10 -05:00
stmmac_mdio.c
stmmac_pci.c
stmmac_pcs.h
stmmac_platform.c net: stmmac: honor error code from stmmac_dt_phy() 2018-02-20 14:13:22 -05:00
stmmac_platform.h
stmmac_ptp.c
stmmac_ptp.h
stmmac.h net: stmmac: set MSS for each tx DMA channel 2018-02-20 14:13:17 -05:00